From 7be7e5d1d69dde3956b1f21ad0cb01abb1debe3a Mon Sep 17 00:00:00 2001 From: JG Date: Tue, 21 Jun 2022 15:05:03 +0100 Subject: [PATCH] default value for org --- app/views/schemes/check_answers.html.erb | 4 ++++ app/views/schemes/confirm_secondary.html.erb | 2 +- app/views/schemes/details.html.erb | 5 ++--- config/routes.rb | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/schemes/check_answers.html.erb b/app/views/schemes/check_answers.html.erb index d2254147b..5a6fcaa90 100644 --- a/app/views/schemes/check_answers.html.erb +++ b/app/views/schemes/check_answers.html.erb @@ -16,6 +16,10 @@ <%= summary_list.row do |row| %> <% row.key { attr[:name].eql?("Registered under Care Standards Act 2000") ? "Registered under Care Standards Act 2000" : attr[:name].to_s.humanize } %> <% row.value { details_html(attr) } %> + <% row.action( + text: "Change", + href: scheme_details_path(scheme_id: @scheme.id), + ) %> <% end %> <% end %> <% end %> diff --git a/app/views/schemes/confirm_secondary.html.erb b/app/views/schemes/confirm_secondary.html.erb index 382d33094..7f7da7d35 100644 --- a/app/views/schemes/confirm_secondary.html.erb +++ b/app/views/schemes/confirm_secondary.html.erb @@ -1,4 +1,4 @@ -<% content_for :title, "What client group is this scheme intended for?" %> +<% content_for :title, "Does this scheme provide for another client group?" %> <% content_for :before_content do %> <%= govuk_back_link( diff --git a/app/views/schemes/details.html.erb b/app/views/schemes/details.html.erb index 3dd5d3489..19498feb4 100644 --- a/app/views/schemes/details.html.erb +++ b/app/views/schemes/details.html.erb @@ -9,7 +9,7 @@ <%= render partial: "organisations/headings", locals: { main: "Scheme details", sub: @scheme.service_name } %> -<%= form_for(@scheme, method: :patch, url: scheme_check_answers_path(scheme_id: @scheme.id)) do |f| %> +<%= form_for(@scheme, method: :patch, url: scheme_check_your_answers_path(scheme_id: @scheme.id)) do |f| %>
<%= f.govuk_error_summary %> @@ -40,8 +40,7 @@ :name, label: { text: "Which organisation manages this scheme", size: "m" }, hint: { text: "Enter organisation name" }, - selected: selected_option(@scheme.organisation.id), - options: { disabled: [""], selected: selected_option(@scheme.organisation.name) }, + options: { disabled: [""], selected: @scheme.organisation.name }, "data-controller": %w[accessible-autocomplete conditional-filter] %> <% end %> diff --git a/config/routes.rb b/config/routes.rb index d73a44291..7ec63b30f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -43,6 +43,7 @@ Rails.application.routes.draw do patch "support", to: "schemes#support" get "support", to: "schemes#support" get "update", to: "schemes#update" + get "details", to: "schemes#details" patch "check-your-answers", to: "schemes#check_answers" get "check-your-answers", to: "schemes#check_answers" patch "confirm-secondary-client-group", to: "schemes#confirm_secondary_group"