diff --git a/app/views/ownership_certificate_validation_requests/edit.html.erb b/app/views/ownership_certificate_validation_requests/edit.html.erb index afd99a3e..ac321300 100644 --- a/app/views/ownership_certificate_validation_requests/edit.html.erb +++ b/app/views/ownership_certificate_validation_requests/edit.html.erb @@ -27,9 +27,7 @@ >
-

- If you need this information in an alternative format, contact your case officer on <%= @local_authority["feedback_email"] %> or by telephone at <%= @local_authority["telephone_number"] %>. -

+ <%= render "shared/alternative_map" %>

We need to confirm who owns the land for this application

diff --git a/app/views/planning_applications/show.html.erb b/app/views/planning_applications/show.html.erb index 9ad1669f..6fdb0870 100644 --- a/app/views/planning_applications/show.html.erb +++ b/app/views/planning_applications/show.html.erb @@ -30,9 +30,7 @@ <%= @planning_application["description"] %>

-

- If you need this information in an alternative format, contact your case officer on <%= @local_authority["feedback_email"] %> or by telephone at <%= @local_authority["telephone_number"] %>. -

+<%= render "shared/alternative_map" %>
<%= render(ConsultationStatusComponent.new(planning_application: @planning_application)) %> diff --git a/app/views/red_line_boundary_change_validation_requests/edit.html.erb b/app/views/red_line_boundary_change_validation_requests/edit.html.erb index 0f7fe08b..f7f534aa 100644 --- a/app/views/red_line_boundary_change_validation_requests/edit.html.erb +++ b/app/views/red_line_boundary_change_validation_requests/edit.html.erb @@ -46,9 +46,9 @@ } ) %>
-

- If you need this information in an alternative format, contact your case officer on <%= @local_authority["feedback_email"] %> or by telephone at [telephone]. -

+
+ <%= render "shared/alternative_map" %> +

<%= render "form" %> diff --git a/app/views/red_line_boundary_change_validation_requests/show.html.erb b/app/views/red_line_boundary_change_validation_requests/show.html.erb index 379fc6dc..1e1e053a 100644 --- a/app/views/red_line_boundary_change_validation_requests/show.html.erb +++ b/app/views/red_line_boundary_change_validation_requests/show.html.erb @@ -30,9 +30,9 @@ accessibility_text: "An interactive map centred on your address where the newly proposed red line boundary lines are drawn to create the site outline." } %> -

- If you need this information in an alternative format, contact your case officer on <%= @local_authority["feedback_email"] %> or by telephone at <%= @local_authority["telephone_number"] %>. -

+
+ <%= render "shared/alternative_map" %> +

<% if @validation_request["approved"] == false %> diff --git a/app/views/shared/_alternative_map.html.erb b/app/views/shared/_alternative_map.html.erb new file mode 100644 index 00000000..cf2a5ee0 --- /dev/null +++ b/app/views/shared/_alternative_map.html.erb @@ -0,0 +1,11 @@ +<% if @local_authority["feedback_email"].present? || @local_authority["telephone_number"].present? %> +

+ <% if @local_authority["feedback_email"].present? && @local_authority["phone_number"].present? %> + If you need this information in an alternative format, contact your case officer on <%= @local_authority["feedback_email"] %> or by telephone at <%= @local_authority["telephone_number"] %>. + <% elsif @local_authority["feedback_email"].present? %> + If you need this information in an alternative format, contact your case officer on <%= @local_authority["feedback_email"] %>. + <% else %> + If you need this information in an alternative format, contact your case officer by telephone at <%= @local_authority["telephone_number"] %>. + <% end %> +

+<% end %> diff --git a/spec/system/ownership_certificate_validation_request_spec.rb b/spec/system/ownership_certificate_validation_request_spec.rb index 42730098..b6c1526a 100644 --- a/spec/system/ownership_certificate_validation_request_spec.rb +++ b/spec/system/ownership_certificate_validation_request_spec.rb @@ -10,6 +10,7 @@ Rails.configuration.api_protocol = "https" stub_successful_get_planning_application + stub_successful_get_local_authority stub_get_ownership_certificate_validation_request( id: 19, planning_id: 28, diff --git a/spec/system/red_line_boundary_change_validation_request_spec.rb b/spec/system/red_line_boundary_change_validation_request_spec.rb index 7ece509b..b428a7a4 100644 --- a/spec/system/red_line_boundary_change_validation_request_spec.rb +++ b/spec/system/red_line_boundary_change_validation_request_spec.rb @@ -10,6 +10,7 @@ Rails.configuration.api_protocol = "https" stub_successful_get_planning_application + stub_successful_get_local_authority stub_get_red_line_boundary_change_validation_request( id: 10, planning_id: 28,