From ced82057f67ac6bf14446c0dcb15bdfbb468f1be Mon Sep 17 00:00:00 2001 From: Matthew Phelan Date: Fri, 17 Sep 2021 14:41:51 +0100 Subject: [PATCH] back link init --- app/views/form/questions/tenant_age.html.erb | 3 +++ app/views/form/questions/tenant_code.html.erb | 3 +++ 2 files changed, 6 insertions(+) diff --git a/app/views/form/questions/tenant_age.html.erb b/app/views/form/questions/tenant_age.html.erb index 9a6d028b3..9b1031f8c 100644 --- a/app/views/form/questions/tenant_age.html.erb +++ b/app/views/form/questions/tenant_age.html.erb @@ -1,4 +1,7 @@ <%= turbo_frame_tag "case_log_form", target: "_top" do %> + <%= render GovukComponent::BackLinkComponent.new href: 'tenant_code' do %> + back + <% end %> <%= form_with action: '/case_logs', method: "next_question", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> <%= f.govuk_number_field :tenant_age, hint: { text: "More detail" }, diff --git a/app/views/form/questions/tenant_code.html.erb b/app/views/form/questions/tenant_code.html.erb index 251712985..51905b458 100644 --- a/app/views/form/questions/tenant_code.html.erb +++ b/app/views/form/questions/tenant_code.html.erb @@ -1,4 +1,7 @@ <%= turbo_frame_tag "case_log_form", target: "_top" do %> + <%= render GovukComponent::BackLinkComponent.new href: "/case_logs/#{case_log_id}" do %> + Back + <% end %> <%= form_with action: '/case_logs', method: "next_question", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> <%= f.govuk_text_field :tenant_code, hint: { text: "More detail" },