From 962aa388df67c383b6d48e1be1c4c1cacb59353d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 2 Apr 2025 17:48:22 +0200 Subject: [PATCH 1/8] Remove redundant placeholders in attachment fields Saying that we're supposed to introduce a descriptive title in a field labelled as "Title" is redundant. Besides, the text of the placeholder was barely distinguishable, making it harder to fill in the form. --- app/components/attachable/fields_component.html.erb | 2 +- config/locales/en/documents.yml | 1 - config/locales/en/images.yml | 1 - config/locales/es/documents.yml | 1 - config/locales/es/images.yml | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/components/attachable/fields_component.html.erb b/app/components/attachable/fields_component.html.erb index 45d9770ba..bf48fb959 100644 --- a/app/components/attachable/fields_component.html.erb +++ b/app/components/attachable/fields_component.html.erb @@ -4,7 +4,7 @@ <%= f.hidden_field :cached_attachment %>
- <%= f.text_field :title, placeholder: t("#{plural_name}.form.title_placeholder") %> + <%= f.text_field :title %>
<% if attachable.attachment.attached? && attachable.attachment.image? %> diff --git a/config/locales/en/documents.yml b/config/locales/en/documents.yml index d60fd5c9d..5630b10a3 100644 --- a/config/locales/en/documents.yml +++ b/config/locales/en/documents.yml @@ -5,7 +5,6 @@ en: additional: Additional documentation form: title: Documents - title_placeholder: Add a descriptive title for the document delete_button: Remove document cancel_button: Cancel note: "You can upload up to a maximum of %{max_documents_allowed} documents of following content types: %{accepted_content_types}, up to %{max_file_size} MB per file." diff --git a/config/locales/en/images.yml b/config/locales/en/images.yml index 155056604..93a74fc50 100644 --- a/config/locales/en/images.yml +++ b/config/locales/en/images.yml @@ -3,7 +3,6 @@ en: remove_image: Remove image form: title: Descriptive image - title_placeholder: Add a descriptive title for the image delete_button: Remove image note: "You can upload one image of following content types: %{accepted_content_types}, up to %{max_file_size} MB." add_new_image: Add image diff --git a/config/locales/es/documents.yml b/config/locales/es/documents.yml index 88121ace3..afa9fb542 100644 --- a/config/locales/es/documents.yml +++ b/config/locales/es/documents.yml @@ -5,7 +5,6 @@ es: additional: Documentación adicional form: title: Documentos - title_placeholder: Añade un título descriptivo para el documento delete_button: Eliminar documento cancel_button: Cancelar note: "Puedes subir hasta un máximo de %{max_documents_allowed} documentos en los formatos: %{accepted_content_types}, y de hasta %{max_file_size} MB por archivo." diff --git a/config/locales/es/images.yml b/config/locales/es/images.yml index ed197fa7d..32e5cb5a4 100644 --- a/config/locales/es/images.yml +++ b/config/locales/es/images.yml @@ -3,7 +3,6 @@ es: remove_image: Eliminar imagen form: title: Imagen descriptiva - title_placeholder: Añade un título descriptivo para la imagen delete_button: Eliminar imagen note: "Puedes subir una imagen en los formatos: %{accepted_content_types}, y de hasta %{max_file_size} MB por archivo." add_new_image: Añadir imagen From 16329908388d6b265d82b575a1a1c3edcaa7f12e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 2 Apr 2025 18:21:21 +0200 Subject: [PATCH 2/8] Extract component to render officing results form In a couple of commits we're going to add some styles for this form, and it's easier to know where to add these styles when there's a component. --- .../officing/results/form_component.html.erb | 49 +++++++++++++++++ .../officing/results/form_component.rb | 19 +++++++ app/helpers/officing_helper.rb | 8 --- app/views/officing/results/new.html.erb | 52 +------------------ 4 files changed, 69 insertions(+), 59 deletions(-) create mode 100644 app/components/officing/results/form_component.html.erb create mode 100644 app/components/officing/results/form_component.rb diff --git a/app/components/officing/results/form_component.html.erb b/app/components/officing/results/form_component.html.erb new file mode 100644 index 000000000..cbe4b2b92 --- /dev/null +++ b/app/components/officing/results/form_component.html.erb @@ -0,0 +1,49 @@ +<%= form_tag(officing_poll_results_path(poll), { id: "officer_assignment_form" }) do %> +
+
+ <%= label_tag :officer_assignment_id, t("officing.results.new.booth") %> + <%= select_tag :officer_assignment_id, + booths_for_officer_select_options(officer_assignments), + { prompt: t("officing.results.new.select_booth") } %> +
+
+ + <% poll.questions.each do |question| %> +
+
+

<%= question.title %>

+
+ <% question.question_options.each_with_index do |option, i| %> +
+ + <%= text_field_tag "questions[#{question.id}][#{i}]", answer_result_value(question.id, i), placeholder: "0" %> +
+ <% end %> +
+
+ <% end %> + +
+
+

<%= t("officing.results.new.ballots_white") %>

+ <%= text_field_tag :whites, params[:whites].presence, placeholder: "0" %> +
+ +
+

<%= t("officing.results.new.ballots_null") %>

+ <%= text_field_tag :nulls, params[:nulls].presence, placeholder: "0" %> +
+ +
+

<%= t("officing.results.new.ballots_total") %>

+ <%= text_field_tag :total, params[:total].presence, placeholder: "0" %> +
+
+
+ +
+
+ <%= submit_tag t("officing.results.new.submit"), class: "button expanded" %> +
+
+<% end %> diff --git a/app/components/officing/results/form_component.rb b/app/components/officing/results/form_component.rb new file mode 100644 index 000000000..dc5ecaffc --- /dev/null +++ b/app/components/officing/results/form_component.rb @@ -0,0 +1,19 @@ +class Officing::Results::FormComponent < ApplicationComponent + attr_reader :poll, :officer_assignments + use_helpers :booths_for_officer_select_options + + def initialize(poll, officer_assignments) + @poll = poll + @officer_assignments = officer_assignments + end + + private + + def answer_result_value(question_id, option_index) + return nil if params.blank? + return nil if params[:questions].blank? + return nil if params[:questions][question_id.to_s].blank? + + params[:questions][question_id.to_s][option_index.to_s] + end +end diff --git a/app/helpers/officing_helper.rb b/app/helpers/officing_helper.rb index 3078f3c84..15c2e7788 100644 --- a/app/helpers/officing_helper.rb +++ b/app/helpers/officing_helper.rb @@ -6,12 +6,4 @@ module OfficingHelper options.sort_by! { |x| x[0] } options_for_select(options, params[:oa]) end - - def answer_result_value(question_id, option_index) - return nil if params.blank? - return nil if params[:questions].blank? - return nil if params[:questions][question_id.to_s].blank? - - params[:questions][question_id.to_s][option_index.to_s] - end end diff --git a/app/views/officing/results/new.html.erb b/app/views/officing/results/new.html.erb index c53ff92d5..c1b6c43b3 100644 --- a/app/views/officing/results/new.html.erb +++ b/app/views/officing/results/new.html.erb @@ -1,56 +1,6 @@ <% if @officer_assignments.any? %>

<%= t("officing.results.new.title", poll: @poll.name) %>

- - <%= form_tag(officing_poll_results_path(@poll), { id: "officer_assignment_form" }) do %> -
-
- <%= label_tag :officer_assignment_id, t("officing.results.new.booth") %> - <%= select_tag :officer_assignment_id, - booths_for_officer_select_options(@officer_assignments), - { prompt: t("officing.results.new.select_booth") } %> -
-
- - <% @poll.questions.each do |question| %> -
-
-

<%= question.title %>

-
- <% question.question_options.each_with_index do |option, i| %> -
- - <%= text_field_tag "questions[#{question.id}][#{i}]", answer_result_value(question.id, i), placeholder: "0" %> -
- <% end %> -
-
- <% end %> - -
-
-

<%= t("officing.results.new.ballots_white") %>

- <%= text_field_tag :whites, params[:whites].presence, placeholder: "0" %> -
- -
-

<%= t("officing.results.new.ballots_null") %>

- <%= text_field_tag :nulls, params[:nulls].presence, placeholder: "0" %> -
- -
-

<%= t("officing.results.new.ballots_total") %>

- <%= text_field_tag :total, params[:total].presence, placeholder: "0" %> -
-
-
- -
-
- <%= submit_tag t("officing.results.new.submit"), class: "button expanded" %> -
-
- <% end %> - + <%= render Officing::Results::FormComponent.new(@poll, @officer_assignments) %> <% else %>

<%= @poll.name %>

From 31f413de61e36869ed28077610adeb2b34a30d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 2 Apr 2025 18:08:49 +0200 Subject: [PATCH 3/8] Use labels in officing results form Back when we added all the missing labels (changes that we merged in commit c34cab282), we forgot about fields which had placeholdes, since Axe doesn't report an error when there are placeholders but there aren't labels. In this case, we were using an invalid
<% question.question_options.each_with_index do |option, i| %>
- + <%= label_tag "questions_#{question.id}_#{i}", option.title %> <%= text_field_tag "questions[#{question.id}][#{i}]", answer_result_value(question.id, i), placeholder: "0" %>
<% end %> @@ -25,17 +25,17 @@
-

<%= t("officing.results.new.ballots_white") %>

+ <%= label_tag :whites, t("officing.results.new.ballots_white") %> <%= text_field_tag :whites, params[:whites].presence, placeholder: "0" %>
-

<%= t("officing.results.new.ballots_null") %>

+ <%= label_tag :nulls, t("officing.results.new.ballots_null") %> <%= text_field_tag :nulls, params[:nulls].presence, placeholder: "0" %>
-

<%= t("officing.results.new.ballots_total") %>

+ <%= label_tag :total, t("officing.results.new.ballots_total") %> <%= text_field_tag :total, params[:total].presence, placeholder: "0" %>
diff --git a/spec/system/officing/results_spec.rb b/spec/system/officing/results_spec.rb index 59abe9497..7b9ebce80 100644 --- a/spec/system/officing/results_spec.rb +++ b/spec/system/officing/results_spec.rb @@ -59,15 +59,15 @@ describe "Officing Results", :with_frozen_time do select booth.name, from: "Booth" - fill_in "questions[#{question_1.id}][0]", with: "100" - fill_in "questions[#{question_1.id}][1]", with: "200" + fill_in "Yes", with: "100" + fill_in "No", with: "200" - fill_in "questions[#{question_2.id}][0]", with: "333" - fill_in "questions[#{question_2.id}][1]", with: "444" + fill_in "Today", with: "333" + fill_in "Tomorrow", with: "444" - fill_in "whites", with: "66" - fill_in "nulls", with: "77" - fill_in "total", with: "88" + fill_in "Totally blank ballots", with: "66" + fill_in "Invalid ballots", with: "77" + fill_in "Valid ballots", with: "88" click_button "Save" @@ -102,11 +102,11 @@ describe "Officing Results", :with_frozen_time do booth_name = partial_result.booth_assignment.booth.name select booth_name, from: "Booth" - fill_in "questions[#{question_1.id}][0]", with: "5555" - fill_in "questions[#{question_1.id}][1]", with: "200" - fill_in "whites", with: "6" - fill_in "nulls", with: "7" - fill_in "total", with: "8" + fill_in "Yes", with: "5555" + fill_in "No", with: "200" + fill_in "Totally blank ballots", with: "6" + fill_in "Invalid ballots", with: "7" + fill_in "Valid ballots", with: "8" click_button "Save" From ff3ada780d4308840a3bc0a2e4f022a3db871749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 2 Apr 2025 18:28:45 +0200 Subject: [PATCH 4/8] Use fieldsets and legends in officing results form We were using

tags instead of a combination of
and tags to group fields together. --- app/assets/stylesheets/application.scss | 1 + .../stylesheets/officing/results/form.scss | 5 +++++ .../officing/results/form_component.html.erb | 10 ++++------ spec/system/officing/results_spec.rb | 19 +++++++++++++------ 4 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 app/assets/stylesheets/officing/results/form.scss diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 2d8805553..1be22b348 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -29,6 +29,7 @@ @import "management/**/*"; @import "milestones/**/*"; @import "moderation/**/*"; +@import "officing/**/*"; @import "polls/**/*"; @import "proposals/**/*"; @import "relationable/**/*"; diff --git a/app/assets/stylesheets/officing/results/form.scss b/app/assets/stylesheets/officing/results/form.scss new file mode 100644 index 000000000..97649145c --- /dev/null +++ b/app/assets/stylesheets/officing/results/form.scss @@ -0,0 +1,5 @@ +.officing-results-form { + legend { + @include header-font-size(h3); + } +} diff --git a/app/components/officing/results/form_component.html.erb b/app/components/officing/results/form_component.html.erb index 5747876e6..7d32d0439 100644 --- a/app/components/officing/results/form_component.html.erb +++ b/app/components/officing/results/form_component.html.erb @@ -1,4 +1,4 @@ -<%= form_tag(officing_poll_results_path(poll), { id: "officer_assignment_form" }) do %> +<%= form_tag(officing_poll_results_path(poll), { id: "officer_assignment_form", class: "officing-results-form" }) do %>
<%= label_tag :officer_assignment_id, t("officing.results.new.booth") %> @@ -9,17 +9,15 @@
<% poll.questions.each do |question| %> -
-
-

<%= question.title %>

-
+
+ <%= question.title %> <% question.question_options.each_with_index do |option, i| %>
<%= label_tag "questions_#{question.id}_#{i}", option.title %> <%= text_field_tag "questions[#{question.id}][#{i}]", answer_result_value(question.id, i), placeholder: "0" %>
<% end %> -
+

<% end %> diff --git a/spec/system/officing/results_spec.rb b/spec/system/officing/results_spec.rb index 7b9ebce80..9eb49ad59 100644 --- a/spec/system/officing/results_spec.rb +++ b/spec/system/officing/results_spec.rb @@ -59,11 +59,15 @@ describe "Officing Results", :with_frozen_time do select booth.name, from: "Booth" - fill_in "Yes", with: "100" - fill_in "No", with: "200" + within_fieldset question_1.title do + fill_in "Yes", with: "100" + fill_in "No", with: "200" + end - fill_in "Today", with: "333" - fill_in "Tomorrow", with: "444" + within_fieldset question_2.title do + fill_in "Today", with: "333" + fill_in "Tomorrow", with: "444" + end fill_in "Totally blank ballots", with: "66" fill_in "Invalid ballots", with: "77" @@ -102,8 +106,11 @@ describe "Officing Results", :with_frozen_time do booth_name = partial_result.booth_assignment.booth.name select booth_name, from: "Booth" - fill_in "Yes", with: "5555" - fill_in "No", with: "200" + within_fieldset question_1.title do + fill_in "Yes", with: "5555" + fill_in "No", with: "200" + end + fill_in "Totally blank ballots", with: "6" fill_in "Invalid ballots", with: "7" fill_in "Valid ballots", with: "8" From 9308189a009af34687ec0c1088f1868d47034afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 2 Apr 2025 19:20:21 +0200 Subject: [PATCH 5/8] Use number fields to enter number of votes This way the fields are easier to use, and we can get rid of the placeholders. Note we're simplifying the `answer_result_value` in order to make it easier to return `0` instead of `nil` when the field is empty. Also note there's a small change of behavior here; previously, these fields were empty by default, and now their value is `0` by default, so blindly clicking the "Save" button would send `0` instead of an empty value. I don't think it's a big deal, though, but we need to keep that in mind. --- .../officing/results/form_component.html.erb | 8 ++++---- .../officing/results/form_component.rb | 6 +----- .../officing/results/form_component_spec.rb | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 spec/components/officing/results/form_component_spec.rb diff --git a/app/components/officing/results/form_component.html.erb b/app/components/officing/results/form_component.html.erb index 7d32d0439..d1c7870ec 100644 --- a/app/components/officing/results/form_component.html.erb +++ b/app/components/officing/results/form_component.html.erb @@ -14,7 +14,7 @@ <% question.question_options.each_with_index do |option, i| %>
<%= label_tag "questions_#{question.id}_#{i}", option.title %> - <%= text_field_tag "questions[#{question.id}][#{i}]", answer_result_value(question.id, i), placeholder: "0" %> + <%= number_field_tag "questions[#{question.id}][#{i}]", answer_result_value(question.id, i), min: 0 %>
<% end %> @@ -24,17 +24,17 @@
<%= label_tag :whites, t("officing.results.new.ballots_white") %> - <%= text_field_tag :whites, params[:whites].presence, placeholder: "0" %> + <%= number_field_tag :whites, params[:whites].to_i, min: 0 %>
<%= label_tag :nulls, t("officing.results.new.ballots_null") %> - <%= text_field_tag :nulls, params[:nulls].presence, placeholder: "0" %> + <%= number_field_tag :nulls, params[:nulls].to_i, min: 0 %>
<%= label_tag :total, t("officing.results.new.ballots_total") %> - <%= text_field_tag :total, params[:total].presence, placeholder: "0" %> + <%= number_field_tag :total, params[:total].to_i, min: 0 %>

diff --git a/app/components/officing/results/form_component.rb b/app/components/officing/results/form_component.rb index dc5ecaffc..a21979a1c 100644 --- a/app/components/officing/results/form_component.rb +++ b/app/components/officing/results/form_component.rb @@ -10,10 +10,6 @@ class Officing::Results::FormComponent < ApplicationComponent private def answer_result_value(question_id, option_index) - return nil if params.blank? - return nil if params[:questions].blank? - return nil if params[:questions][question_id.to_s].blank? - - params[:questions][question_id.to_s][option_index.to_s] + params.dig(:questions, question_id.to_s, option_index.to_s).to_i end end diff --git a/spec/components/officing/results/form_component_spec.rb b/spec/components/officing/results/form_component_spec.rb new file mode 100644 index 000000000..81f19e38e --- /dev/null +++ b/spec/components/officing/results/form_component_spec.rb @@ -0,0 +1,19 @@ +require "rails_helper" + +describe Officing::Results::FormComponent do + let(:poll) { create(:poll, ends_at: 1.day.ago) } + before { create(:poll_question, :yes_no, poll: poll, title: "Agreed?") } + + it "uses number fields with 0 as a default value" do + render_inline Officing::Results::FormComponent.new(poll, Poll::OfficerAssignment.none) + + page.find(:fieldset, "Agreed?") do |fieldset| + expect(fieldset).to have_field "Yes", with: 0, type: :number + expect(fieldset).to have_field "No", with: 0, type: :number + end + + expect(page).to have_field "Totally blank ballots", with: 0, type: :number + expect(page).to have_field "Invalid ballots", with: 0, type: :number + expect(page).to have_field "Valid ballots", with: 0, type: :number + end +end From c6f1974c45f6d54a15511fd6fa21a557e85112da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 2 Apr 2025 15:54:24 +0200 Subject: [PATCH 6/8] Use labels in nested option fields We were using a placeholder, which is way less accessible than a label. One issue here (which also happened before, but is now more obvious) is that, when adding several options, there will be many fields with the same label. Another issue is that, for some languages, we're using texts like "Add a closed answer", which might be confusing because we might be editing an existing answer. The proper solution would probably be using the text "Option 1", "Option 2", ... I'm not doing so right now because I'm not sure that's a good option and because changing the text would mean losing the existing translations. --- .../questions/_question_option_fields.html.erb | 3 +-- spec/system/admin/legislation/questions_spec.rb | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/views/admin/legislation/questions/_question_option_fields.html.erb b/app/views/admin/legislation/questions/_question_option_fields.html.erb index c610c298c..6e6b3080c 100644 --- a/app/views/admin/legislation/questions/_question_option_fields.html.erb +++ b/app/views/admin/legislation/questions/_question_option_fields.html.erb @@ -3,8 +3,7 @@
<%= f.translatable_fields do |translations_form| %> <%= translations_form.text_field :value, - placeholder: t("admin.legislation.questions.form.value_placeholder"), - label: false %> + label: t("admin.legislation.questions.form.value_placeholder") %> <% end %>
diff --git a/spec/system/admin/legislation/questions_spec.rb b/spec/system/admin/legislation/questions_spec.rb index 0573c7dcd..ad0376280 100644 --- a/spec/system/admin/legislation/questions_spec.rb +++ b/spec/system/admin/legislation/questions_spec.rb @@ -107,7 +107,7 @@ describe "Admin legislation questions", :admin do create(:legislation_question_option, question: question, value: "Original") visit edit_question_url - find("#nested_question_options input").set("Changed") + fill_in "Add a closed answer", with: "Changed" click_button "Save changes" expect(page).to have_content "Question updated successfully" @@ -154,11 +154,11 @@ describe "Admin legislation questions", :admin do click_link "Add option" - find("#nested_question_options input").set("Option 1") + fill_in "Add a closed answer", with: "Option 1" select "Español", from: "Current language" - find("#nested_question_options input").set("Opción 1") + fill_in "Add a closed answer", with: "Opción 1" click_button "Save changes" @@ -180,11 +180,11 @@ describe "Admin legislation questions", :admin do click_link "Add option" - find("#nested_question_options input").set("Opción 1") + fill_in "Add a closed answer", with: "Opción 1" select "English", from: "Current language" - find("#nested_question_options input").set("Option 1") + fill_in "Add a closed answer", with: "Option 1" click_button "Save changes" From 50e81535835be6adfe0a6b63ab04bb507054a52c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 2 Apr 2025 20:21:41 +0200 Subject: [PATCH 7/8] Use a legend instead of a label to group option fields Using a label for a non-existent element ID was invalid HTML. --- .../legislation/questions/_form.html.erb | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/app/views/admin/legislation/questions/_form.html.erb b/app/views/admin/legislation/questions/_form.html.erb index cdab0e727..a9c467bf9 100644 --- a/app/views/admin/legislation/questions/_form.html.erb +++ b/app/views/admin/legislation/questions/_form.html.erb @@ -17,24 +17,26 @@
-
- <%= f.label :question_options, t("admin.legislation.questions.form.question_options") %> -
+
+ + <%= t("admin.legislation.questions.form.question_options") %> + -
- <%= f.fields_for :question_options do |ff| %> - <%= render "question_option_fields", f: ff %> - <% end %> +
+ <%= f.fields_for :question_options do |ff| %> + <%= render "question_option_fields", f: ff %> + <% end %> -
-
- <%= link_to_add_association t("admin.legislation.questions.form.add_option"), - f, - :question_options, - class: "button hollow" %> +
+
+ <%= link_to_add_association t("admin.legislation.questions.form.add_option"), + f, + :question_options, + class: "button hollow" %> +
-
+
<%= f.submit(class: "button success expanded", value: t("admin.legislation.questions.#{admin_submit_action(@question)}.submit_button")) %> From 9dee0d9824dac8eecfbd68f48302414340f5898a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 2 Apr 2025 17:55:25 +0200 Subject: [PATCH 8/8] Use a hint instead of a placeholder in retire explanation A hint is much easier to read than a placeholder. --- app/views/proposals/retire_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/proposals/retire_form.html.erb b/app/views/proposals/retire_form.html.erb index fef9e5c6d..641028774 100644 --- a/app/views/proposals/retire_form.html.erb +++ b/app/views/proposals/retire_form.html.erb @@ -28,7 +28,7 @@ <%= translations_form.text_area :retired_explanation, rows: 4, maxlength: 500, - placeholder: t("proposals.retire_form.retired_explanation_placeholder") %> + hint: t("proposals.retire_form.retired_explanation_placeholder") %>
<% end %>