Browse Source

padding for checkbox fieldset

pull/717/head
JG 3 years ago
parent
commit
a5c796f20e
  1. 2
      app/controllers/schemes_controller.rb
  2. 5
      app/views/schemes/details.html.erb
  3. 17
      app/views/schemes/edit_name.html.erb
  4. 7
      app/views/schemes/new.html.erb
  5. 1
      app/views/schemes/show.html.erb

2
app/controllers/schemes_controller.rb

@ -102,7 +102,7 @@ private
when "details"
scheme_primary_client_group_path(@scheme)
when "edit-name"
schemes_path(@scheme)
scheme_path(@scheme)
end
end

5
app/views/schemes/details.html.erb

@ -18,12 +18,15 @@
label: { text: "Scheme name", size: "m" },
hint: { text: "This is how you’ll refer to this supported housing scheme within your organisation. For example, the name could relate to the address or location. You’ll be able to see the client group when selecting it." } %>
<%= f.govuk_check_boxes_fieldset :sensitive,
legend: { text: "This scheme contains confidential information" } do %>
<%= f.govuk_check_box :sensitive,
1,
0,
checked: @scheme.sensitive?,
multiple: false,
checked: @scheme.sensitive == "Yes",
label: { text: "This scheme contains confidential information" } %>
<% end %>
<% null_option = [OpenStruct.new(id: "", name: "Select an option")] %>
<% organisations = Organisation.all.map { |org| OpenStruct.new(id: org.id, name: org.name) } %>

17
app/views/schemes/edit_name.html.erb

@ -18,24 +18,19 @@
label: { text: "Scheme name", size: "m" },
hint: { text: "This is how you’ll refer to this supported housing scheme within your organisation. For example, the name could relate to the address or location. You’ll be able to see the client group when selecting it." } %>
<%= f.govuk_check_boxes_fieldset :sensitive,
legend: { text: "This scheme contains confidential information" } do %>
<%= f.govuk_check_box :sensitive,
1,
0,
checked: @scheme.sensitive?,
multiple: false,
checked: @scheme.sensitive == "Yes",
label: { text: "This scheme contains confidential information" } %>
<% end %>
<% null_option = [OpenStruct.new(id: "", name: "Select an option")] %>
<% organisations = Organisation.all.map { |org| OpenStruct.new(id: org.id, name: org.name) } %>
<% managing_org_answer_options = null_option + organisations %>
<%= f.govuk_collection_select :managing_organisation_id,
managing_org_answer_options,
:id,
:name,
label: { text: "Which organisation manages this scheme?", size: "m" },
options: { required: true },
"data-controller": %w[accessible-autocomplete conditional-filter] %>
<% if current_user.support? %>
<%= f.govuk_collection_select :owning_organisation_id,

7
app/views/schemes/new.html.erb

@ -20,11 +20,14 @@
label: { text: "Scheme name", size: "m" },
hint: { text: "This is how you refer to this supported housing scheme within your organisation. For example, the name could relate to the address or location. You’ll be able to see the client group when selecting it." } %>
<%= f.govuk_check_boxes_fieldset :sensitive,
legend: { text: "This scheme contains confidential information" } do %>
<%= f.govuk_check_box :sensitive,
"Yes",
checked: @scheme.sensitive?,
1,
0,
multiple: false,
label: { text: "This scheme contains confidential information" } %>
<% end %>
<% null_option = [OpenStruct.new(id: "", name: "Select an option")] %>
<% organisations = Organisation.all.map { |org| OpenStruct.new(id: org.id, name: org.name) } %>

1
app/views/schemes/show.html.erb

@ -16,6 +16,7 @@
<div class="govuk-grid-column-two-thirds">
<%= govuk_summary_list do |summary_list| %>
<% @scheme.display_attributes.each do |attr| %>
<% next if current_user.data_coordinator? && attr[:name] == ("Housing stock owned by") %>
<%= summary_list.row do |row| %>
<% row.key { attr[:name].eql?("Registered under Care Standards Act 2000") ? "Registered under Care Standards Act 2000" : attr[:name].to_s.humanize } %>
<% row.value { details_html(attr) } %>

Loading…
Cancel
Save