Files
grecia/app/views/tracking/progress_bars/_form.html.erb
taitus 12089282c8 Align admin progress bars form fields with new translations interface
Add new js method to recover selected language to disable correctly default language fields.
2019-07-01 15:03:48 +02:00

41 lines
1.3 KiB
Plaintext

<%= render "shared/globalize_locales", resource: @progress_bar %>
<%= translatable_form_for [:tracking, *resource_hierarchy_for(@progress_bar)] do |f| %>
<div class="row">
<div class="small-12 medium-6 column">
<%= f.enum_select :kind %>
</div>
</div>
<div class="row">
<%= f.translatable_fields do |translations_form| %>
<div class="small-12 medium-6 column end">
<%= translations_form.text_field :title %>
</div>
<% end %>
</div>
<% progress_options = { min: ProgressBar::RANGE.min, max: ProgressBar::RANGE.max, step: 1 } %>
<div class="row">
<div class="small-12 medium-6 large-2 column">
<%= f.text_field :percentage, { type: :range,
id: "percentage_range",
class: "column" }.merge(progress_options) %>
</div>
<div class="small-12 medium-6 large-2 column">
<div class="input-group">
<%= f.text_field :percentage, { type: :number,
label: false,
class: "input-group-field" }.merge(progress_options) %>
<span class="input-group-label">%</span>
</div>
</div>
<div class="column">
<%= f.submit nil, class: "button success" %>
</div>
</div>
<% end %>