Use <legend> tags to group radio button fields
In a few places, we were using <label> tags that pointed to elements that didn't exist.
This commit is contained in:
@@ -3,14 +3,14 @@
|
||||
<%= render "shared/errors" %>
|
||||
|
||||
<div class="row expanded">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :action_type %>
|
||||
<fieldset class="small-12 medium-4 column">
|
||||
<legend><%= attribute_name(:action_type) %></legend>
|
||||
<% ::Dashboard::Action.action_types.keys.each do |action_type_value| %>
|
||||
<span class="margin-right">
|
||||
<%= f.radio_button :action_type, action_type_value %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="small-12 column margin-top">
|
||||
<%= f.check_box :active %>
|
||||
|
||||
@@ -5,4 +5,10 @@ class Admin::Dashboard::Actions::FormComponent < ApplicationComponent
|
||||
@dashboard_action = dashboard_action
|
||||
@url_action = url_action
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def attribute_name(attribute)
|
||||
Dashboard::Action.human_attribute_name(attribute)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -60,14 +60,14 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.label :status %>
|
||||
<fieldset class="small-12 column">
|
||||
<legend><%= attribute_name(:status) %></legend>
|
||||
<% ::Legislation::DraftVersion::VALID_STATUSES.each do |status| %>
|
||||
<%= f.radio_button :status, status %>
|
||||
<span class="help-text"><%= t("admin.legislation.draft_versions.form.hints.status.#{status}") %></span>
|
||||
<br>
|
||||
<% end %>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= f.check_box :final_version %>
|
||||
|
||||
@@ -11,6 +11,10 @@ class Admin::Legislation::DraftVersions::FormComponent < ApplicationComponent
|
||||
|
||||
private
|
||||
|
||||
def attribute_name(attribute)
|
||||
Legislation::DraftVersion.human_attribute_name(attribute)
|
||||
end
|
||||
|
||||
def process
|
||||
draft_version.process
|
||||
end
|
||||
|
||||
@@ -10,11 +10,13 @@
|
||||
|
||||
<div class="small-12 medium-4 column">
|
||||
<h3><%= t("admin.site_customization.pages.form.options") %></h3>
|
||||
<%= f.label :status %>
|
||||
<fieldset>
|
||||
<legend><%= attribute_name(:status) %></legend>
|
||||
<% ::SiteCustomization::Page::VALID_STATUSES.each do |status| %>
|
||||
<%= f.radio_button :status, status %>
|
||||
<br>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
|
||||
<%= f.check_box :more_info_flag, class: "small" %>
|
||||
<%= f.check_box :print_content_flag %>
|
||||
|
||||
@@ -6,4 +6,10 @@ class Admin::SiteCustomization::Pages::FormComponent < ApplicationComponent
|
||||
def initialize(page)
|
||||
@page = page
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def attribute_name(attribute)
|
||||
SiteCustomization::Page.human_attribute_name(attribute)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user