Improve layout in budget headings form
This commit is contained in:
3
app/assets/stylesheets/admin/budget_headings/form.scss
Normal file
3
app/assets/stylesheets/admin/budget_headings/form.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
.admin .budget-headings-form {
|
||||
@include full-width-form;
|
||||
}
|
||||
@@ -1,44 +1,40 @@
|
||||
<%= render "shared/globalize_locales", resource: heading %>
|
||||
|
||||
<%= translatable_form_for heading, url: path do |f| %>
|
||||
<%= translatable_form_for heading, url: path, html: { class: "budget-headings-form" } do |f| %>
|
||||
<%= render "shared/globalize_locales", resource: heading %>
|
||||
|
||||
<%= render "shared/errors", resource: heading %>
|
||||
|
||||
<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>
|
||||
<%= f.translatable_fields do |translations_form| %>
|
||||
<div class="small-12 medium-6 column end">
|
||||
<%= translations_form.text_field :name, maxlength: 50 %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="small-12 medium-6">
|
||||
<%= f.text_field :price, maxlength: 8 %>
|
||||
|
||||
<% if heading.budget.approval_voting? %>
|
||||
<%= f.number_field :max_ballot_lines,
|
||||
hint: t("admin.budget_headings.form.max_ballot_lines_info") %>
|
||||
<% end %>
|
||||
|
||||
<%= f.text_field :population,
|
||||
maxlength: 8,
|
||||
data: { toggle_focus: "population-info" },
|
||||
hint: t("admin.budget_headings.form.population_info") %>
|
||||
|
||||
<%= f.text_field :latitude, maxlength: 22 %>
|
||||
<%= f.text_field :longitude, maxlength: 22 %>
|
||||
<p class="help-text" id="budgets-coordinates-help-text">
|
||||
<%= t("admin.budget_headings.form.coordinates_info") %>
|
||||
</p>
|
||||
|
||||
<%= f.check_box :allow_custom_content %>
|
||||
<p class="help-text" id="budgets-content-blocks-help-text">
|
||||
<%= t("admin.budget_headings.form.content_blocks_info") %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.text_field :price, maxlength: 8 %>
|
||||
|
||||
<% if heading.budget.approval_voting? %>
|
||||
<%= f.number_field :max_ballot_lines,
|
||||
hint: t("admin.budget_headings.form.max_ballot_lines_info") %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<%= f.text_field :population,
|
||||
maxlength: 8,
|
||||
data: { toggle_focus: "population-info" },
|
||||
hint: t("admin.budget_headings.form.population_info") %>
|
||||
|
||||
<%= f.text_field :latitude, maxlength: 22 %>
|
||||
<%= f.text_field :longitude, maxlength: 22 %>
|
||||
<p class="help-text" id="budgets-coordinates-help-text">
|
||||
<%= t("admin.budget_headings.form.coordinates_info") %>
|
||||
</p>
|
||||
|
||||
<%= f.check_box :allow_custom_content %>
|
||||
<p class="help-text" id="budgets-content-blocks-help-text">
|
||||
<%= t("admin.budget_headings.form.content_blocks_info") %>
|
||||
</p>
|
||||
|
||||
<%= f.submit t("admin.budget_headings.form.#{action}"), class: "button success" %>
|
||||
</div>
|
||||
<div class="clear">
|
||||
<%= f.submit t("admin.budget_headings.form.#{action}"), class: "button hollow" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user