Browse Source

lint

pull/787/head
JG 3 years ago
parent
commit
e00b9ceb37
  1. 1
      app/views/users/dpo.html.erb
  2. 1
      app/views/users/key_contact.html.erb
  3. 9
      app/views/users/new.html.erb

1
app/views/users/dpo.html.erb

@ -1,6 +1,5 @@
<% content_for :title, "Is this user your organisation’s data protection officer?" %>
<% content_for :before_content do %>
<%= govuk_back_link(href: :back) %>
<% end %>

1
app/views/users/key_contact.html.erb

@ -1,6 +1,5 @@
<% content_for :title, "Is this user a key contact for this service?" %>
<% content_for :before_content do %>
<%= govuk_back_link(href: :back) %>
<% end %>

9
app/views/users/new.html.erb

@ -41,8 +41,7 @@
options: { disabled: [""], selected: @organisation_id ? answer_options.first : "" } %>
<% end %>
<% hints_for_roles = { data_provider: ["Default role for this organisation", "Can view and submit logs for this organisation"], data_coordinator: ["Can view and submit logs for this organisation and any of its managing agents", "Can manage details for this organisation", "Can manage users for this organisation"], support: nil } %>
<% hints_for_roles = { data_provider: ["Default role for this organisation", "Can view and submit logs for this organisation"], data_coordinator: ["Can view and submit logs for this organisation and any of its managing agents", "Can manage details for this organisation", "Can manage users for this organisation"], support: nil } %>
<% roles_with_hints = current_user.assignable_roles.map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize, description: hints_for_roles[key.to_sym]) } %>
@ -50,9 +49,9 @@
roles_with_hints,
:id,
:name,
->(option) do
result = option.description&.sum(nil) {|hint| content_tag(:li, hint) }
end,
lambda { |option|
result = option.description&.sum(nil) { |hint| content_tag(:li, hint) }
},
legend: { text: "Role", size: "m" } %>
<%= f.govuk_submit "Continue" %>

Loading…
Cancel
Save