diff --git a/app/views/admin/poll/questions/answers/_form.html.erb b/app/views/admin/poll/questions/answers/_form.html.erb index 7c6ce8673..72ffb4771 100644 --- a/app/views/admin/poll/questions/answers/_form.html.erb +++ b/app/views/admin/poll/questions/answers/_form.html.erb @@ -4,21 +4,19 @@ <%= f.hidden_field :question_id, value: @question.id %> -
-
- <%= f.text_field :title %> + <%= f.label :title, t('admin.questions.new.form.title') %> + <%= f.text_field :title, label: false %> -
- <%= f.cktext_area :description, - maxlength: Poll::Question.description_max_length, - ckeditor: { language: I18n.locale } %> -
- -
-
- <%= f.submit(class: "button expanded", value: t("shared.save")) %> -
-
-
+
+ <%= f.label :description, t('admin.questions.new.form.description') %> + <%= f.cktext_area :description, + maxlength: Poll::Question.description_max_length, + ckeditor: { language: I18n.locale }, + label: false %>
+ +
+ <%= f.submit(class: "button expanded", value: t("shared.save")) %> +
+ <% end %> diff --git a/app/views/admin/poll/questions/answers/images/index.html.erb b/app/views/admin/poll/questions/answers/images/index.html.erb index 79333b660..d97f648eb 100644 --- a/app/views/admin/poll/questions/answers/images/index.html.erb +++ b/app/views/admin/poll/questions/answers/images/index.html.erb @@ -1,9 +1,16 @@ <%= back_link_to admin_question_path(@answer.question) %> -
- <%= link_to "Add image", new_admin_answer_image_path(@answer) %> -
+<%= link_to t("admin.questions.answers.images.add_image"), + new_admin_answer_image_path(@answer), + class: "button hollow float-right" %> + + <% @answer.images.each do |image| %> - <%= render_image(image, :large, true) if image.present? %> +
+ <%= render_image(image, :large, true) if image.present? %> +
<% end %> diff --git a/app/views/admin/poll/questions/answers/images/new.html.erb b/app/views/admin/poll/questions/answers/images/new.html.erb index 80126bef7..a3113b5e4 100644 --- a/app/views/admin/poll/questions/answers/images/new.html.erb +++ b/app/views/admin/poll/questions/answers/images/new.html.erb @@ -1,10 +1,12 @@ -<%= form_for(Poll::Question::Answer.new, - url: admin_answer_images_path(@answer), - method: :post) do |f| %> - -
- <%= render 'images/nested_image', imageable: @answer, f: f, image_fields: :images %> -
+
+ <%= form_for(Poll::Question::Answer.new, + url: admin_answer_images_path(@answer), + method: :post) do |f| %> - <%= f.submit "Save image" %> -<% end %> \ No newline at end of file +
+ <%= render 'images/nested_image', imageable: @answer, f: f, image_fields: :images %> +
+ + <%= f.submit t("admin.questions.answers.images.save_image"), class: "button success" %> + <% end %> +
diff --git a/app/views/admin/poll/questions/answers/new.html.erb b/app/views/admin/poll/questions/answers/new.html.erb index b4d02cfeb..1400bf765 100644 --- a/app/views/admin/poll/questions/answers/new.html.erb +++ b/app/views/admin/poll/questions/answers/new.html.erb @@ -1,5 +1,10 @@ <%= back_link_to %> + +

<%= t('admin.answers.new.title') %>

diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 6a1bf6258..02d8bacdd 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -587,6 +587,13 @@ en: new: title: "Create Question" poll_label: "Poll" + form: + title: Title + description: Description + answers: + images: + add_image: "Add image" + save_image: "Save image" show: proposal: Original proposal author: Author diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 472418d0c..9e0de770e 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -587,6 +587,13 @@ es: new: title: "Crear pregunta ciudadana" poll_label: "Votación" + form: + title: Título + description: Descripción + answers: + images: + add_image: "Añadir imagen" + save_image: "Guardar imagen" show: proposal: Propuesta ciudadana original author: Autor