Browse Source

Run default linters on ERB templates

pull/482/head
Paul Robert Lloyd 3 years ago
parent
commit
42cb583332
  1. 1
      app/views/case_logs/_log_list.html.erb
  2. 5
      app/views/case_logs/bulk_upload.html.erb
  3. 3
      app/views/case_logs/index.html.erb
  4. 3
      app/views/devise/confirmations/new.html.erb
  5. 6
      app/views/devise/passwords/edit.html.erb
  6. 3
      app/views/devise/passwords/new.html.erb
  7. 6
      app/views/devise/passwords/reset_password.html.erb
  8. 6
      app/views/devise/sessions/new.html.erb
  9. 12
      app/views/devise/shared/_links.html.erb
  10. 3
      app/views/devise/two_factor_authentication/show.html.erb
  11. 3
      app/views/devise/unlocks/new.html.erb
  12. 4
      app/views/form/_check_answers_table.html.erb
  13. 3
      app/views/form/_checkbox_question.html.erb
  14. 11
      app/views/form/_date_question.html.erb
  15. 5
      app/views/form/_interruption_screen_question.html.erb
  16. 17
      app/views/form/_numeric_question.html.erb
  17. 55
      app/views/form/_radio_question.html.erb
  18. 5
      app/views/form/_select_question.html.erb
  19. 11
      app/views/form/_text_question.html.erb
  20. 11
      app/views/form/_textarea_question.html.erb
  21. 2
      app/views/form/check_answers.html.erb
  22. 10
      app/views/form/page.html.erb
  23. 34
      app/views/layouts/application.html.erb
  24. 2
      app/views/layouts/mailer.html.erb
  25. 15
      app/views/organisations/edit.html.erb
  26. 6
      app/views/pagy/_nav.html.erb
  27. 15
      app/views/users/edit.html.erb
  28. 15
      app/views/users/new.html.erb
  29. 6
      spec/features/reset_password.html.erb

1
app/views/case_logs/_log_list.html.erb

@ -59,4 +59,3 @@
</table>
</section>
</figure>

5
app/views/case_logs/bulk_upload.html.erb

@ -5,8 +5,7 @@
<%= f.govuk_file_field :case_log_bulk_upload,
label: { text: content_for(:title), size: "l" },
hint: { text: "Upload a spreadsheet using the template" }
%>
hint: { text: "Upload a spreadsheet using the template" } %>
<%= f.govuk_submit "Upload" %>
<%= f.govuk_submit "Upload" %>
<% end %>

3
app/views/case_logs/index.html.erb

@ -9,7 +9,7 @@
<%#= govuk_link_to "Upload logs", bulk_upload_case_logs_path %>
</div>
<%= render partial: "log_filters"%>
<%= render partial: "log_filters" %>
<% if @case_logs.present? %>
<div class="app-filter-layout__content">
<%= render partial: "log_list", locals: { case_logs: @case_logs, title: "Logs", pagy: @pagy } %>
@ -17,4 +17,3 @@
</div>
<% end %>
</div>

3
app/views/devise/confirmations/new.html.erb

@ -7,8 +7,7 @@
label: { text: "Email address" },
autocomplete: "email",
spellcheck: "false",
value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email)
%>
value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
<%= f.govuk_submit "Resend confirmation instructions" %>
<% end %>

6
app/views/devise/passwords/edit.html.erb

@ -19,12 +19,10 @@
<%= f.govuk_password_field :password,
label: { text: "New password" },
hint: @minimum_password_length ? { text: "Your password must be at least #{@minimum_password_length} characters and hard to guess." } : nil,
autocomplete: "new-password"
%>
autocomplete: "new-password" %>
<%= f.govuk_password_field :password_confirmation,
label: { text: "Confirm new password" }
%>
label: { text: "Confirm new password" } %>
<%= f.govuk_submit "Update" %>
</div>

3
app/views/devise/passwords/new.html.erb

@ -22,8 +22,7 @@
<%= f.govuk_email_field :email,
label: { text: "Email address" },
autocomplete: "email",
spellcheck: "false"
%>
spellcheck: "false" %>
<%= f.govuk_submit "Send email" %>
</div>

6
app/views/devise/passwords/reset_password.html.erb

@ -20,12 +20,10 @@
<%= f.govuk_password_field :password,
label: { text: "New password" },
hint: @minimum_password_length ? { text: "Your password must be at least #{@minimum_password_length} characters and hard to guess." } : nil,
autocomplete: "new-password"
%>
autocomplete: "new-password" %>
<%= f.govuk_password_field :password_confirmation,
label: { text: "Confirm new password" }
%>
label: { text: "Confirm new password" } %>
<%= f.govuk_submit "Update" %>
</div>

6
app/views/devise/sessions/new.html.erb

@ -19,12 +19,10 @@
<%= f.govuk_email_field :email,
label: { text: "Email address" },
autocomplete: "email",
spellcheck: "false"
%>
spellcheck: "false" %>
<%= f.govuk_password_field :password,
autocomplete: "current-password"
%>
autocomplete: "current-password" %>
<%= f.hidden_field :start, value: request["start"] %>
<%= f.govuk_submit "Sign in" %>

12
app/views/devise/shared/_links.html.erb

@ -1,25 +1,25 @@
<%- if controller_name != 'sessions' %>
<p class="govuk-body">Already have an account? <%= govuk_link_to "Sign in", new_session_path(resource_name) %>.</p><br />
<p class="govuk-body">Already have an account? <%= govuk_link_to "Sign in", new_session_path(resource_name) %>.</p>
<% end %>
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
<%= govuk_link_to "Sign up", new_registration_path(resource_name) %><br />
<%= govuk_link_to "Sign up", new_registration_path(resource_name) %><br>
<% end %>
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<p class="govuk-body"> You can <%= govuk_link_to "reset your password", new_password_path(resource_name) %> if you’ve forgotten it.<p><br />
<p class="govuk-body">You can <%= govuk_link_to "reset your password", new_password_path(resource_name) %> if you’ve forgotten it.</p>
<% end %>
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
<%= govuk_link_to "Didn’t receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
<%= govuk_link_to "Didn’t receive confirmation instructions?", new_confirmation_path(resource_name) %><br>
<% end %>
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
<%= govuk_link_to "Didn’t receive unlock instructions?", new_unlock_path(resource_name) %><br />
<%= govuk_link_to "Didn’t receive unlock instructions?", new_unlock_path(resource_name) %><br>
<% end %>
<%- if devise_mapping.omniauthable? %>
<%- resource_class.omniauth_providers.each do |provider| %>
<%= govuk_link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), method: :post %><br />
<%= govuk_link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), method: :post %><br>
<% end %>
<% end %>

3
app/views/devise/two_factor_authentication/show.html.erb

@ -16,8 +16,7 @@
label: { text: "Security code", size: "m" },
width: 5,
autocomplete: 'one-time-code',
autofocus: true
%>
autofocus: true %>
<%= f.govuk_submit "Submit" %>
</div>

3
app/views/devise/unlocks/new.html.erb

@ -6,8 +6,7 @@
<%= f.govuk_email_field :email,
label: { text: "Email address" },
autocomplete: "email",
spellcheck: "false"
%>
spellcheck: "false" %>
<%= f.govuk_submit "Resend unlock instructions" %>
<% end %>

4
app/views/form/_check_answers_table.html.erb

@ -3,9 +3,9 @@
<%= question.check_answer_label.to_s.present? ? question.check_answer_label.to_s : question.header.to_s %>
</dt>
<dd class="govuk-summary-list__value">
<%= get_answer_label(question, @case_log) %><br/>
<%= get_answer_label(question, @case_log) %><br>
<% question.get_inferred_answers(@case_log).each do |inferred_answer| %>
<span class="govuk-!-font-weight-regular app-!-colour-muted"><%= inferred_answer %></span><br/>
<span class="govuk-!-font-weight-regular app-!-colour-muted"><%= inferred_answer %></span><br>
<% end %>
</dd>
<dd class="govuk-summary-list__actions">

3
app/views/form/_checkbox_question.html.erb

@ -16,8 +16,7 @@
hint: { text: options['hint'] },
checked: @case_log[key] == 1,
exclusive: after_divider,
**stimulus_html_attributes(question)
%>
**stimulus_html_attributes(question) %>
<% end %>
<% end %>
<% end %>

11
app/views/form/_date_question.html.erb

@ -1,9 +1,8 @@
<%= render partial: "form/guidance/#{question.guidance_partial}" if question.guidance_partial %>
<%= f.govuk_date_field question.id.to_sym,
caption: caption(caption_text, page_header, conditional),
legend: legend(question, page_header, conditional),
hint: { text: question.hint_text&.html_safe },
width: 20,
**stimulus_html_attributes(question)
%>
caption: caption(caption_text, page_header, conditional),
legend: legend(question, page_header, conditional),
hint: { text: question.hint_text&.html_safe },
width: 20,
**stimulus_html_attributes(question) %>

5
app/views/form/_interruption_screen_question.html.erb

@ -14,10 +14,9 @@
key,
label: { text: options['value'] },
hint: { text: options['hint'] },
**stimulus_html_attributes(question)
%>
**stimulus_html_attributes(question) %>
<% end %>
<% end %>
<% end %>
<%= f.govuk_submit "Save and continue", accesskey: "s", class: "app-button--inverse govuk-!-margin-bottom-0" %>
<% end %>
<% end %>

17
app/views/form/_numeric_question.html.erb

@ -1,12 +1,11 @@
<%= render partial: "form/guidance/#{question.guidance_partial}" if question.guidance_partial %>
<%= f.govuk_number_field question.id.to_sym,
caption: caption(caption_text, page_header, conditional),
label: legend(question, page_header, conditional),
hint: { text: question.hint_text&.html_safe },
min: question.min, max: question.max, step: question.step,
width: question.width, :readonly => question.read_only?,
prefix_text: question.prefix.to_s,
suffix_text: question.suffix.is_a?(String) ? question.suffix : nil,
**stimulus_html_attributes(question)
%>
caption: caption(caption_text, page_header, conditional),
label: legend(question, page_header, conditional),
hint: { text: question.hint_text&.html_safe },
min: question.min, max: question.max, step: question.step,
width: question.width, :readonly => question.read_only?,
prefix_text: question.prefix.to_s,
suffix_text: question.suffix.is_a?(String) ? question.suffix : nil,
**stimulus_html_attributes(question) %>

55
app/views/form/_radio_question.html.erb

@ -1,37 +1,36 @@
<%= render partial: "form/guidance/#{question.guidance_partial}" if question.guidance_partial %>
<%= f.govuk_radio_buttons_fieldset question.id.to_sym,
caption: caption(caption_text, page_header, conditional),
legend: legend(question, page_header, conditional),
hint: { text: question.hint_text&.html_safe } do %>
caption: caption(caption_text, page_header, conditional),
legend: legend(question, page_header, conditional),
hint: { text: question.hint_text&.html_safe } do %>
<% question.displayed_answer_options.map do |key, options| %>
<% if key.starts_with?("divider") %>
<%= f.govuk_radio_divider %>
<% question.displayed_answer_options.map do |key, options| %>
<% if key.starts_with?("divider") %>
<%= f.govuk_radio_divider %>
<% else %>
<% conditional_question = find_conditional_question(@page, question, key) %>
<% if conditional_question.nil? %>
<%= f.govuk_radio_button question.id,
key,
label: { text: options['value'] },
hint: { text: options['hint'] },
**stimulus_html_attributes(question) %>
<% else %>
<% conditional_question = find_conditional_question(@page, question, key) %>
<% if conditional_question.nil? %>
<%= f.govuk_radio_button question.id,
key,
label: { text: options['value'] },
hint: { text: options['hint'] },
**stimulus_html_attributes(question)
%>
<% else %>
<%= f.govuk_radio_button question.id,
key,
label: { text: options['value'] },
hint: { text: options['hint'] },
**stimulus_html_attributes(question) do %>
<%= render partial: "#{conditional_question.type}_question", locals: {
question: conditional_question,
caption_text: caption_text,
page_header: page_header,
f: f,
conditional: true
} %>
<% end %>
<%= f.govuk_radio_button question.id,
key,
label: { text: options['value'] },
hint: { text: options['hint'] },
**stimulus_html_attributes(question) do %>
<%= render partial: "#{conditional_question.type}_question", locals: {
question: conditional_question,
caption_text: caption_text,
page_header: page_header,
f: f,
conditional: true
} %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>

5
app/views/form/_select_question.html.erb

@ -2,7 +2,7 @@
<% selected = @case_log.public_send(question.id) || "" %>
<%= answers = question.displayed_answer_options.map { |key, value| OpenStruct.new(id: key, name: value) }
f.govuk_collection_select question.id.to_sym,
f.govuk_collection_select question.id.to_sym,
answers,
:id,
:name,
@ -10,5 +10,4 @@
label: legend(question, page_header, conditional),
hint: { text: question.hint_text&.html_safe },
options: { disabled: [""], selected: selected },
"data-controller": "accessible-autocomplete"
%>
"data-controller": "accessible-autocomplete" %>

11
app/views/form/_text_question.html.erb

@ -1,9 +1,8 @@
<%= render partial: "form/guidance/#{question.guidance_partial}" if question.guidance_partial %>
<%= f.govuk_text_field question.id.to_sym,
caption: caption(caption_text, page_header, conditional),
label: legend(question, page_header, conditional),
hint: { text: question.hint_text&.html_safe },
width: question.width ? question.width : nil,
**stimulus_html_attributes(question)
%>
caption: caption(caption_text, page_header, conditional),
label: legend(question, page_header, conditional),
hint: { text: question.hint_text&.html_safe },
width: question.width ? question.width : nil,
**stimulus_html_attributes(question) %>

11
app/views/form/_textarea_question.html.erb

@ -1,9 +1,8 @@
<%= render partial: "form/guidance/#{question.guidance_partial}" if question.guidance_partial %>
<%= f.govuk_text_area question.id.to_sym,
caption: caption(caption_text, page_header, conditional),
label: legend(question, page_header, conditional),
hint: { text: question.hint_text&.html_safe },
width: question.width ? question.width : nil,
**stimulus_html_attributes(question)
%>
caption: caption(caption_text, page_header, conditional),
label: legend(question, page_header, conditional),
hint: { text: question.hint_text&.html_safe },
width: question.width ? question.width : nil,
**stimulus_html_attributes(question) %>

2
app/views/form/check_answers.html.erb

@ -26,7 +26,7 @@
<%= govuk_button_link_to 'Save and go to next incomplete section', "/logs/#{@case_log.id}/#{@case_log.form.next_incomplete_section_redirect_path(subsection, @case_log)}", secondary: true %>
<% elsif @case_log.status == "completed" || @case_log.form.all_subsections_except_declaration_completed?(@case_log) %>
<%= govuk_button_link_to 'Save and go to submit', "/logs/#{@case_log.id}/#{@case_log.form.next_incomplete_section_redirect_path(subsection, @case_log)}", secondary: true %>
<% end%>
<% end %>
<% end %>
<% end %>
</div>

10
app/views/form/page.html.erb

@ -11,7 +11,7 @@
<%= form_with model: @case_log, url: form_case_log_path(@case_log), method: "post", local: true do |f| %>
<div class="govuk-grid-row">
<div class=<%= @page.questions[0].type == "interruption_screen" ? "govuk-grid-column-full-from-desktop" : "govuk-grid-column-two-thirds-from-desktop"%>>
<div class="govuk-grid-column-<%= @page.questions[0].type == "interruption_screen" ? "full-from-desktop" : "two-thirds-from-desktop" %>">
<% remove_other_page_errors(@case_log, @page) %>
<%= f.govuk_error_summary %>
@ -29,7 +29,7 @@
<% end %>
<% @page.non_conditional_questions.map do |question| %>
<div id=<%= question.id + "_div " %><%= display_question_key_div(@page, question) %> >
<div id="<%= question.id %>_div" <%= display_question_key_div(@page, question) %>>
<% if question.read_only? %>
<hr class="govuk-section-break govuk-section-break--visible govuk-section-break--m">
<% end %>
@ -44,11 +44,11 @@
<%= f.hidden_field :page, value: @page.id %>
<% if @case_log.form.is_last_question?(@page, @subsection, @case_log) %>
<%= f.govuk_submit "Submit lettings log", accesskey: "s" %>
<%else %>
<% else %>
<% if !@page.id.include?("value_check") %>
<%= f.govuk_submit "Save and continue", accesskey: "s" %>
<%= f.govuk_submit "Save and continue", accesskey: "s" %>
<% end %>
<%end %>
<% end %>
</div>
</div>
<% end %>

34
app/views/layouts/application.html.erb

@ -15,10 +15,10 @@
<%= favicon_link_tag asset_path('images/govuk-apple-touch-icon-180x180.png'), rel: 'apple-touch-icon', type: 'image/png', size: '180x180' %>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "vendor/html5shiv.min.js" %>
<%= javascript_tag do -%>
<script>
window.html5.elements = 'output';
html5.shivDocument(document);
<% end -%>
</script>
<%= javascript_include_tag "vendor/polyfill-output-value.js" %>
<%= javascript_include_tag "vendor/outerHTML.js" %>
<%= javascript_include_tag "application", defer: true %>
@ -43,20 +43,19 @@
<%= govuk_skip_link %>
<%= govuk_header(
logotype: 'GOV.UK',
service_name: t('service_name'),
service_url: current_user.nil? ? "/" : '/logs'
) do |component|
if current_user.nil?
component.navigation_item(text: 'Sign in', href: user_session_path)
elsif
component.navigation_item(text: 'Logs', href: case_logs_path)
component.navigation_item(text: 'Your organisation', href: "/organisations/#{current_user.organisation.id}")
component.navigation_item(text: 'Your account', href: account_path)
component.navigation_item(text: 'Sign out', href: destroy_user_session_path)
end
logotype: 'GOV.UK',
service_name: t('service_name'),
service_url: current_user.nil? ? "/" : '/logs'
) do |component|
if current_user.nil?
component.navigation_item(text: 'Sign in', href: user_session_path)
elsif
component.navigation_item(text: 'Logs', href: case_logs_path)
component.navigation_item(text: 'Your organisation', href: "/organisations/#{current_user.organisation.id}")
component.navigation_item(text: 'Your account', href: account_path)
component.navigation_item(text: 'Sign out', href: destroy_user_session_path)
end
%>
end %>
<div class="govuk-width-container">
<aside>
@ -69,14 +68,13 @@
</aside>
<main class="govuk-main-wrapper" id="main-content" role="main">
<% if flash.notice && !flash.notice.include?('translation missing') %>
<% if flash.notice && !flash.notice.include?('translation missing') %>
<%= govuk_notification_banner(
title_text: 'Success',
success: true, title_heading_level: 3,
title_id: "swanky-notifications") do |notification_banner|
notification_banner.heading(text: flash.notice)
end
%>
end %>
<% end %>
<%= content_for?(:content) ? yield(:content) : yield %>
</main>

2
app/views/layouts/mailer.html.erb

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
/* Email styles need to be inline */
</style>

15
app/views/organisations/edit.html.erb

@ -15,29 +15,24 @@
</h1>
<%= f.govuk_text_field :name,
autocomplete: "name"
%>
autocomplete: "name" %>
<%= f.govuk_text_field :address_line1,
label: { text: "Address line 1" },
autocomplete: "address-line1"
%>
autocomplete: "address-line1" %>
<%= f.govuk_text_field :address_line2,
label: { text: "Address line 2" },
autocomplete: "address-line2"
%>
autocomplete: "address-line2" %>
<%= f.govuk_text_field :postcode,
autocomplete: "postal-code",
width: 10
%>
width: 10 %>
<%= f.govuk_phone_field :phone,
label: { text: "Telephone number" },
autocomplete: "tel",
width: 20
%>
width: 20 %>
<%= f.govuk_submit "Save changes" %>
</div>

6
app/views/pagy/_nav.html.erb

@ -5,7 +5,7 @@
<ul class="app-pagination__list">
<li class="app-pagination__item app-pagination__item--prev">
<% if pagy.prev %>
<a class="app-pagination__link" href=<%= "/logs?page=#{pagy.prev}" %>>
<a class="app-pagination__link" href="<%= "/logs?page=#{pagy.prev}" %>">
<% end %>
<span class="app-pagination__link-title">
<svg class="app-pagination__icon" xmlns="http://www.w3.org/2000/svg" height="13" width="17">
@ -20,12 +20,12 @@
<% elsif item.is_a?(String) %>
<li class="app-pagination__item app-pagination__item--current"><span class="govuk-visually-hidden">Page </span><%= item %><span class="govuk-visually-hidden"> (current page) </span></li>
<% else %>
<li class="app-pagination__item"><a class="app-pagination__link" href=<%= "/logs?page=#{item}" %>><span class="govuk-visually-hidden">Page </span><%= item %></a></li>
<li class="app-pagination__item"><a class="app-pagination__link" href="<%= "/logs?page=#{item}" %>"><span class="govuk-visually-hidden">Page </span><%= item %></a></li>
<% end %>
<% end %>
<li class="app-pagination__item app-pagination__item--next">
<% if pagy.next %>
<a class="app-pagination__link" href=<%= "/logs?page=#{pagy.next}" %>>
<a class="app-pagination__link" href="<%= "/logs?page=#{pagy.next}" %>">
<% end %>
Next <span class="govuk-visually-hidden">page</span>
<span class="app-pagination__link-title">

15
app/views/users/edit.html.erb

@ -17,36 +17,31 @@
</h1>
<%= f.govuk_text_field :name,
autocomplete: "name"
%>
autocomplete: "name" %>
<%= f.govuk_email_field :email,
label: { text: "Email address" },
autocomplete: "email",
spellcheck: "false"
%>
spellcheck: "false" %>
<% if current_user.data_coordinator? || current_user.support? %>
<%= roles = current_user.assignable_roles.map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize) }
f.govuk_collection_radio_buttons :role, roles, :id, :name, legend: { text: "Role", size: "m" }
%>
f.govuk_collection_radio_buttons :role, roles, :id, :name, legend: { text: "Role", size: "m" } %>
<%= f.govuk_collection_radio_buttons :is_dpo,
[OpenStruct.new(id: false, name: "No"), OpenStruct.new(id: true, name: "Yes")],
:id,
:name,
inline: true,
legend: { text: "Are #{pronoun(@user, current_user)} a data protection officer?", size: "m" }
%>
legend: { text: "Are #{pronoun(@user, current_user)} a data protection officer?", size: "m" } %>
<%= f.govuk_collection_radio_buttons :is_key_contact,
[OpenStruct.new(id: false, name: "No"), OpenStruct.new(id: true, name: "Yes")],
:id,
:name,
inline: true,
legend: { text: "Are #{pronoun(@user, current_user)} a key contact?", size: "m" }
%>
legend: { text: "Are #{pronoun(@user, current_user)} a key contact?", size: "m" } %>
<% end %>
<%= f.govuk_submit "Save changes" %>

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

@ -17,35 +17,30 @@
</h1>
<%= f.govuk_text_field :name,
autocomplete: "name"
%>
autocomplete: "name" %>
<%= f.govuk_email_field :email,
label: { text: "Email address" },
autocomplete: "email",
spellcheck: "false",
value: @resource.email
%>
value: @resource.email %>
<%= roles = current_user.assignable_roles.map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize) }
f.govuk_collection_radio_buttons :role, roles, :id, :name, legend: { text: "Role", size: "m" }
%>
f.govuk_collection_radio_buttons :role, roles, :id, :name, legend: { text: "Role", size: "m" } %>
<%= f.govuk_collection_radio_buttons :is_dpo,
[OpenStruct.new(id: false, name: "No"), OpenStruct.new(id: true, name: "Yes")],
:id,
:name,
inline: true,
legend: { text: "Are #{pronoun(@user, current_user)} a data protection officer?", size: "m" }
%>
legend: { text: "Are #{pronoun(@user, current_user)} a data protection officer?", size: "m" } %>
<%= f.govuk_collection_radio_buttons :is_key_contact,
[OpenStruct.new(id: false, name: "No"), OpenStruct.new(id: true, name: "Yes")],
:id,
:name,
inline: true,
legend: { text: "Are #{pronoun(@user, current_user)} a key contact?", size: "m" }
%>
legend: { text: "Are #{pronoun(@user, current_user)} a key contact?", size: "m" } %>
<%= f.govuk_submit "Continue" %>
</div>

6
spec/features/reset_password.html.erb

@ -20,12 +20,10 @@
<%= f.govuk_password_field :password,
label: { text: "New password" },
hint: @minimum_password_length ? { text: "Your password must be at least #{@minimum_password_length} characters and hard to guess." } : nil,
autocomplete: "new-password"
%>
autocomplete: "new-password" %>
<%= f.govuk_password_field :password_confirmation,
label: { text: "Confirm new password" }
%>
label: { text: "Confirm new password" } %>
<%= f.govuk_submit "Update" %>
</div>

Loading…
Cancel
Save