Skip to content

Commit

Permalink
Chore: Remove next_action_link helper method
Browse files Browse the repository at this point in the history
Remove next_action_link as the functionality can just as easily be provided
with the govuk_button_link_to method from the govuk_components gem
  • Loading branch information
agoldstone93 committed Jan 13, 2025
1 parent 1e2193c commit 9a3ecd9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
5 changes: 0 additions & 5 deletions app/helpers/flow_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,4 @@ def next_action_buttons(
draft_button_text:,
)
end

def next_action_link(continue_id: :continue, continue_text: t("generic.save_and_continue"), html_class: nil)
klasses = ["govuk-button", html_class].compact.join(" ")
govuk_link_to(continue_text, forward_path, id: continue_id, class: klasses)
end
end
2 changes: 1 addition & 1 deletion app/views/citizens/accounts/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<p><%= govuk_link_to t(".link_other_account"), citizens_banks_path %></p>

<div class="govuk-!-padding-top-3">
<%= next_action_link(continue_text: t("generic.continue")) %>
<%= govuk_button_link_to(t("generic.continue"), forward_path) %>
</div>
</div>
</div>
3 changes: 1 addition & 2 deletions app/views/providers/submitted_applications/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@

<%= render "shared/review_application/questions_and_answers" %>

<%= next_action_link continue_text: t(".back_home"), html_class: "govuk-button--secondary no-print" %>

<%= govuk_button_link_to(t(".back_home"), forward_path, secondary: true class: "no-print") %>
<% end %>
14 changes: 5 additions & 9 deletions app/views/shared/_worker_complete.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@
<% continue_text = locals[:continue_text] || nil %>

<%= page_template page_title: heading do %>
<p>
<%= intro_text %>
</p>
<p>
<%= balance_text %>
</p>
<div class="govuk-!-padding-top-3">
<%= next_action_link(continue_text:) %>
</div>
<p class="govuk-body"><%= intro_text %></p>
<p class="govuk-body"><%= balance_text %></p>

<%= govuk_button_link_to(continue_text, forward_path) %>

<span role="status" id="complete"></span>
<% end %>

0 comments on commit 9a3ecd9

Please sign in to comment.