Skip to content

Commit

Permalink
Add help text to maps
Browse files Browse the repository at this point in the history
Accessibility: maps should have text to help users who may have difficulty
interacting with them
  • Loading branch information
cdccollins committed Mar 7, 2024
1 parent 4c2cab5 commit 24d28fc
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
class OwnershipCertificateValidationRequestsController < ValidationRequestsController
before_action :set_validation_request
before_action :set_planning_application
before_action :set_local_authority

def show
respond_to do |format|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class RedLineBoundaryChangeValidationRequestsController < ValidationRequestsController
before_action :set_validation_request, :set_planning_application
before_action :set_validation_request, :set_planning_application, :set_local_authority

def show
respond_to do |format|
Expand Down
4 changes: 4 additions & 0 deletions app/controllers/validation_requests_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ def set_planning_application
@planning_application = Bops::PlanningApplication.find(params[:planning_application_id])
end

def set_local_authority
@local_authority = Bops::LocalAuthority.find(Current.local_authority)
end

def set_validation_request
@validation_request = validation_request_model_klass.find(
params[:id], params[:planning_application_id], params[:change_access_id]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l"><%= t(".title") %></h1>

<%= @planning_application["site"]["address_1"] %>,
<%= @planning_application["site"]["address_2"] %>,
<%= @planning_application["site"]["postcode"] %>
<p class="govuk-body">
<%= @planning_application["site"]["address_1"] %>,
<%= @planning_application["site"]["address_2"] %>,
<%= @planning_application["site"]["postcode"] %>
</p>

<p class="govuk-body-s govuk-!-margin-bottom-1">Planning application reference number</p>
<p class="govuk-body"><%= @planning_application["reference"] %></p>
Expand All @@ -25,6 +27,9 @@
></my-map>
</div>
<div class="govuk-grid-column-two-thirds govuk-!-margin-top-5">
<p class="govuk-body">
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"] %>.
</p>
<p class="govuk-body">
We need to confirm who owns the land for this application
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
<p class="govuk-body">
<%= render(FormattedContentComponent.new(text: @validation_request["reason"])) %>
</p>
<p class="govuk-body">
<strong>How you can make your application valid</strong><br>
</p>
<p class="govuk-body">
<%= @validation_request["suggestion"] %>
</p>
<hr class="govuk-section-break govuk-section-break--xl govuk-section-break--visible">
<% if @validation_request["approved"] == false %>
<strong class="govuk-tag govuk-tag--red">
Expand Down
4 changes: 4 additions & 0 deletions app/views/planning_applications/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
<p class="govuk-body">
<%= @planning_application["description"] %>
</p>

<p class="govuk-body">
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"] %>.
</p>
<hr>

<%= render(ConsultationStatusComponent.new(planning_application: @planning_application)) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="govuk-width-container">
<h1 class="govuk-heading-l"><%= t(".title") %></h1>
<p class="govuk-body"><%= t(".the_following_changes") %></p>
<p class="govuk-heading-s"><%= t(".what_you_need") %></p>
<h2 class="govuk-heading-m"><%= t(".what_you_need") %></h2>
<ul class="govuk-list govuk-list--bullet">
<li><%= t(".select_if_you") %></li>
<li><%= t(".if_you_disagree") %></li>
Expand Down Expand Up @@ -46,6 +46,9 @@
}
) %>
</div>
<p class="govuk-body govuk-!-margin-top-4 govuk-!-margin-bottom-0">
If you need this information in an alternative format, contact your case officer on <%= @local_authority["feedback_email"] %> or by telephone at [telephone].
</p>
<hr class="govuk-section-break govuk-section-break--xl govuk-section-break--visible">
<%= render "form" %>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +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."
} %>
</div>
<p class="govuk-body govuk-!-margin-top-4 govuk-!-margin-bottom-0">
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"] %>.
</p>
<hr class="govuk-section-break govuk-section-break--xl govuk-section-break--visible">
<% if @validation_request["approved"] == false %>
<strong class="govuk-tag govuk-tag--red">
Expand Down
8 changes: 5 additions & 3 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,19 @@ en:
edit:
accessibility_text_original: An interactive map centred on your address where the original red line boundary lines are drawn to create the site outline.
accessibility_text_proposed: An interactive map centred on your address where the newly proposed red line boundary lines are drawn to create the site outline.
click_submit_to: Click submit to complete this action
if_you_disagree: If you disagree, write in the box provided your reason for disagreeing.
click_submit_to: submit your response
if_you_disagree: if you disagree, enter a reason to explain why you disagree
if_your_response: If your response is not received by %{date} your application will be returned to you and your payment refunded.
page_title: "Red line boundary change validation request #%{id} - Back-Office Planning System"
proposed_red_line: Proposed red line boundary
reason_change_is: Reason change is requested
select_if_you: Select if you agree or disagree with the changes made by your case officer
select_if_you: agree or disagree with the proposed changes
the_following_changes: The following changes have been made to your application's red line boundary.
title: Confirm changes to your application's red line boundary
what_you_need: "What you need to do:"
your_original_red: Your original red line boundary
show:
page_title: Confirm changes to your red line boundary
replacement_document_validation_requests:
edit:
click_save_to: Click save or open to add the file
Expand Down

0 comments on commit 24d28fc

Please sign in to comment.