Improve layout in budget groups form

This commit is contained in:
Alberto
2020-03-21 03:45:59 +01:00
committed by Javi Martín
parent 01c21158c4
commit 03e598a53d
4 changed files with 24 additions and 25 deletions

View File

@@ -0,0 +1,3 @@
.admin .budget-groups-form {
@include full-width-form;
}

View File

@@ -1,4 +1,5 @@
.admin .budgets-form {
@include full-width-form;
> fieldset {
border-top: 4px solid $admin-border-color;
@@ -17,8 +18,4 @@
text-transform: uppercase;
}
}
.globalize-languages {
max-width: none;
}
}

View File

@@ -21,3 +21,9 @@
margin-top: 0;
}
}
@mixin full-width-form {
.globalize-languages {
max-width: none;
}
}

View File

@@ -1,30 +1,23 @@
<%= render "shared/globalize_locales", resource: group %>
<%= translatable_form_for group, url: path do |f| %>
<%= translatable_form_for group, url: path, html: { class: "budget-groups-form" } do |f| %>
<%= render "shared/globalize_locales", resource: group %>
<%= render "shared/errors", resource: group %>
<div class="row">
<%= f.translatable_fields do |translations_form| %>
<div class="small-12 medium-6 column end">
<%= translations_form.text_field :name, maxlength: 50 %>
</div>
<% end %>
</div>
<% if group.persisted? %>
<div class="row">
<div class="small-12 medium-6 column">
<div class="small-12 medium-6 column margin">
<%= f.select :max_votable_headings,
(1..group.headings.count),
hint: t("admin.budget_groups.form.max_votable_headings_info") %>
</div>
</div>
<% end %>
<div class="row">
<div class="small-12 medium-6 column">
<%= f.submit t("admin.budget_groups.form.#{action}"), class: "button success" %>
</div>
<div class="clear">
<%= f.submit t("admin.budget_groups.form.#{action}"), class: "button hollow" %>
</div>
<% end %>