Files
grecia/app/components/admin/progress_bars/form_component.html.erb
Javi Martín 9f738b8d5f Fix labels in progress bar percentage selection
We were using the same label for two elements, but the label was only
assigned to one of them.
2024-11-08 15:03:55 +01:00

43 lines
1.4 KiB
Plaintext

<%= render "shared/globalize_locales", resource: progress_bar %>
<%= translatable_form_for progress_bar, url: admin_polymorphic_path(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>
<div class="row percentage-inputs">
<div class="small-12 medium-6 large-2 column">
<%= f.label :percentage, nil, id: "percentage_label" %>
<%= f.text_field :percentage, { type: :range,
id: "percentage_range",
label: false,
"aria-labelledby": "percentage_label",
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 %>