Skip to content

Commit

Permalink
Merge pull request #2848 from DFE-Digital/email-refactor
Browse files Browse the repository at this point in the history
Refactor: remove email helper by inlining
  • Loading branch information
asmega authored Jun 14, 2024
2 parents b12f462 + 75c6367 commit f3b1fa9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 57 deletions.
14 changes: 0 additions & 14 deletions app/helpers/claims/email_address_helper.rb

This file was deleted.

10 changes: 8 additions & 2 deletions app/views/claims/email_address.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@
<%= render("shared/error_summary", instance: @form) if @form.errors.any? %>

<%= form_for @form, url: claim_path(current_journey_routing_name), html: { novalidate: false } do |f| %>
<%= personal_details_caption(f.object.claim) %>
<span class="govuk-caption-xl">
<%= I18n.t("questions.personal_details") %>
</span>

<%= form_group_tag f.object do %>
<h1 class="govuk-label-wrapper">
<%= f.label :email_address, t("questions.email_address"), class: "govuk-label #{label_css_class_for_journey(f.object.journey)}" %>
</h1>

<%= email_govuk_hint(f.object.claim) %>
<div id="email-address-hint" class="govuk-hint">
<p><%= I18n.t("questions.email_address_hint1") %></p>
<p><%= I18n.t("questions.email_address_hint2") %></p>
</div>

<%= errors_tag f.object, :email_address %>

Expand Down
41 changes: 0 additions & 41 deletions spec/helpers/claims/email_address_helper_spec.rb

This file was deleted.

0 comments on commit f3b1fa9

Please sign in to comment.