From 44ee8aa0c0ae8740ce6ece036c0800596105410a Mon Sep 17 00:00:00 2001 From: taitus Date: Sat, 1 Jun 2019 17:59:28 +0200 Subject: [PATCH] Align admin budget_headings form fields with new translations interface --- .../admin/budget_headings/_form.html.erb | 85 ++++++++++--------- 1 file changed, 45 insertions(+), 40 deletions(-) diff --git a/app/views/admin/budget_headings/_form.html.erb b/app/views/admin/budget_headings/_form.html.erb index 5ef142d1a..45f927ed3 100644 --- a/app/views/admin/budget_headings/_form.html.erb +++ b/app/views/admin/budget_headings/_form.html.erb @@ -1,52 +1,57 @@ <%= render "shared/globalize_locales", resource: @heading %> -
+<%= translatable_form_for [:admin, @budget, @group, @heading], url: path do |f| %> - <%= translatable_form_for [:admin, @budget, @group, @heading], url: path do |f| %> - - <%= render "shared/errors", resource: @heading %> + <%= render "shared/errors", resource: @heading %> +
<%= f.translatable_fields do |translations_form| %> - <%= translations_form.text_field :name, - label: t("admin.budget_headings.form.name"), - maxlength: 50, - placeholder: t("admin.budget_headings.form.name") %> +
+ <%= translations_form.text_field :name, + label: t("admin.budget_headings.form.name"), + maxlength: 50, + placeholder: t("admin.budget_headings.form.name") %> +
<% end %> +
- <%= f.text_field :price, - label: t("admin.budget_headings.form.amount"), - maxlength: 8, - placeholder: t("admin.budget_headings.form.amount") %> +
+
+ <%= f.text_field :price, + label: t("admin.budget_headings.form.amount"), + maxlength: 8, + placeholder: t("admin.budget_headings.form.amount") %> - <%= f.label :population, t("admin.budget_headings.form.population") %> -

- <%= t("admin.budget_headings.form.population_info") %> -

- <%= f.text_field :population, - label: false, - maxlength: 8, - placeholder: t("admin.budget_headings.form.population"), - data: {toggle_focus: "population-info"}, - aria: {describedby: "budgets-population-help-text"} %> + <%= f.label :population, t("admin.budget_headings.form.population") %> +

+ <%= t("admin.budget_headings.form.population_info") %> +

+ <%= f.text_field :population, + label: false, + maxlength: 8, + placeholder: t("admin.budget_headings.form.population"), + data: {toggle_focus: "population-info"}, + aria: {describedby: "budgets-population-help-text"} %> - <%= f.text_field :latitude, - label: t("admin.budget_headings.form.latitude"), - maxlength: 22, - placeholder: "latitude" %> + <%= f.text_field :latitude, + label: t("admin.budget_headings.form.latitude"), + maxlength: 22, + placeholder: "latitude" %> - <%= f.text_field :longitude, - label: t("admin.budget_headings.form.longitude"), - maxlength: 22, - placeholder: "longitude" %> -

- <%= t("admin.budget_headings.form.coordinates_info") %> -

+ <%= f.text_field :longitude, + label: t("admin.budget_headings.form.longitude"), + maxlength: 22, + placeholder: "longitude" %> +

+ <%= t("admin.budget_headings.form.coordinates_info") %> +

- <%= f.check_box :allow_custom_content, label: t("admin.budget_headings.form.allow_content_block") %> -

- <%= t("admin.budget_headings.form.content_blocks_info") %> -

+ <%= f.check_box :allow_custom_content, label: t("admin.budget_headings.form.allow_content_block") %> +

+ <%= t("admin.budget_headings.form.content_blocks_info") %> +

- <%= f.submit t("admin.budget_headings.form.#{action}"), class: "button success" %> - <% end %> -
+ <%= f.submit t("admin.budget_headings.form.#{action}"), class: "button success" %> +
+
+<% end %>