Files
grecia/app/views/proposals/retire_form.html.erb
Javi Martín 6fa67b5e53 Use active record translations for labels
This way we can simplify the way we generate form fields. In some cases,
we also use the human attribute in table headers, which IMHO makes
sense.

I haven't moved all of them: for example, sometimes a label is
different depending on whether it's shown to administrators, valuators,
or users. And I haven't touched the ones related to devise, since I
wasn't sure about possible side effects.

Note I've also removed placeholders when they had the same text as their
labels, since they weren't helpful. On the contrary, the added redundant
text to the form, potentially distracting users.
2019-10-07 01:56:23 +02:00

43 lines
1.4 KiB
Plaintext

<div class="proposal-edit row">
<div class="small-12 column">
<h1 class="inline-block"><%= t("proposals.retire_form.title") %></h1>
<h3><%= link_to @proposal.title, @proposal %></h3>
<div data-alert class="callout warning">
<%= t("proposals.retire_form.warning") %>
</div>
<%= render "shared/globalize_locales", resource: @proposal, manage_languages: false %>
<%= translatable_form_for(@proposal, url: retire_proposal_path(@proposal)) do |f| %>
<%= render "shared/errors", resource: @proposal %>
<div class="row">
<div class="small-12 medium-6 large-4 column">
<%= f.select :retired_reason, retire_proposals_options,
include_blank: t("proposals.retire_form.retired_reason_blank") %>
</div>
</div>
<div class="row">
<%= f.translatable_fields do |translations_form| %>
<div class="small-12 medium-9 column float-left">
<%= translations_form.text_area :retired_explanation,
rows: 4, maxlength: 500,
placeholder: t("proposals.retire_form.retired_explanation_placeholder") %>
</div>
<% end %>
</div>
<div class="row">
<div class="actions small-12 medium-3 column">
<%= f.submit(class: "button expanded", value: t("proposals.retire_form.submit_button")) %>
</div>
</div>
<% end %>
</div>
</div>