From fb39e6c09eba3c166aacaeed7239a3db1f68a08a Mon Sep 17 00:00:00 2001 From: taitus Date: Sat, 1 Jun 2019 17:44:57 +0200 Subject: [PATCH] Align admin budget_groups form fields with new translations interface --- app/views/admin/budget_groups/_form.html.erb | 34 +++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/app/views/admin/budget_groups/_form.html.erb b/app/views/admin/budget_groups/_form.html.erb index 5dc71c1e6..bd3cb7d12 100644 --- a/app/views/admin/budget_groups/_form.html.erb +++ b/app/views/admin/budget_groups/_form.html.erb @@ -1,24 +1,34 @@ <%= render "shared/globalize_locales", resource: @group %> -
- <%= translatable_form_for [:admin, @budget, @group], url: path do |f| %> +<%= translatable_form_for [:admin, @budget, @group], url: path do |f| %> - <%= render "shared/errors", resource: @group %> + <%= render "shared/errors", resource: @group %> +
<%= f.translatable_fields do |translations_form| %> - <%= translations_form.text_field :name, - label: t("admin.budget_groups.form.name"), - maxlength: 50, - placeholder: t("admin.budget_groups.form.name") %> +
+ <%= translations_form.text_field :name, + label: t("admin.budget_groups.form.name"), + maxlength: 50, + placeholder: t("admin.budget_groups.form.name") %> +
<% end %> +
- <% if @group.persisted? %> + <% if @group.persisted? %> +
+
<%= f.select :max_votable_headings, (1..@group.headings.count), label: t("admin.budget_groups.max_votable_headings"), placeholder: t("admin.budget_groups.max_votable_headings") %> - <% end %> - - <%= f.submit t("admin.budget_groups.form.#{action}"), class: "button success" %> +
+
<% end %> -
+ +
+
+ <%= f.submit t("admin.budget_groups.form.#{action}"), class: "button success" %> +
+
+<% end %>