Simplify generating form fields with labels
Instead of generating the label and then a field without a label, we can directly generate a field with a label.
This commit is contained in:
@@ -71,16 +71,14 @@
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :status %>
|
||||
<% ::Legislation::DraftVersion::VALID_STATUSES.each do |status| %>
|
||||
<%= f.radio_button :status, status, label: false %>
|
||||
<%= f.label "status_#{status}", t("admin.legislation.draft_versions.statuses.#{status}") %>
|
||||
<%= f.radio_button :status, status, label: t("admin.legislation.draft_versions.statuses.#{status}") %>
|
||||
<span class="help-text"><%= t("admin.legislation.draft_versions.form.hints.status.#{status}") %></span>
|
||||
<br>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :final_version %>
|
||||
<%= f.check_box :final_version, label: false %>
|
||||
<%= f.check_box :final_version %>
|
||||
<span class="help-text"><%= t("admin.legislation.draft_versions.form.hints.final_version") %></span>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user