Skip to content

Commit

Permalink
Update verification decision content
Browse files Browse the repository at this point in the history
When making a recommendation on the assessment in the verification and
review stage we want to show slightly different content on the page.
  • Loading branch information
thomasleese committed Oct 6, 2023
1 parent 8ccf13c commit d7a21b0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
34 changes: 21 additions & 13 deletions app/views/assessor_interface/assessments/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
<% content_for :page_title, "#{"Error: " if @form.errors.any?}#{t("helpers.legend.assessor_interface_assessment_recommendation_form.recommendation")}" %>
<% legend = if @assessment.verify?
t(".legend.verify")
elsif @assessment.review?
t(".legend.review")
else
t(".legend.other")
end %>

<% hint = if @assessment.can_verify?
t(".hint.can_verify")
elsif @assessment.can_review?
t(".hint.can_review")
elsif @assessment.can_award?
t(".hint.can_award")
else
t(".hint.cant_award")
end %>

<% content_for :page_title, "#{"Error: " if @form.errors.any?}#{legend}" %>
<% content_for :back_link_url, assessor_interface_application_form_path(@application_form) %>

<%= form_with model: @form, url: [:assessor_interface, @application_form, @assessment], method: :put do |f| %>
<%= f.govuk_error_summary %>

<%
hint = if @assessment.can_verify?
t(".hint.can_verify")
elsif @assessment.can_award?
t(".hint.can_award")
else
t(".hint.cant_award")
end
%>

<%= f.govuk_collection_radio_buttons :recommendation,
@assessment.available_recommendations,
:itself,
legend: { size: "xl", tag: "h1" },
legend: { size: "xl", tag: "h1", text: legend },
hint: { text: hint } %>

<%= f.govuk_submit prevent_double_click: false do %>
<%= govuk_link_to "Cancel", assessor_interface_application_form_path(@application_form) %>
<%= govuk_link_to "Cancel", [:assessor_interface, @application_form] %>
<% end %>
<% end %>
5 changes: 5 additions & 0 deletions config/locales/assessor_interface.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ en:

assessments:
edit:
legend:
other: QTS review complete
review: Assessment decision
verify: Verification decision
hint:
can_award: You’ve completed your assessment of this QTS application and reviewed the work references.
can_review: You’ve completed your verification checks.
can_verify: You’ve completed your review of this QTS application and marked all sections as complete to your satisfaction.
cant_award: You’ve completed your review of this QTS application and marked 1 or more sections as not completed to your satisfaction.

Expand Down
2 changes: 0 additions & 2 deletions config/locales/helpers.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,6 @@ en:
document: "Example: The right-hand section of your teaching qualification document is missing, please take a new image and upload it."
decline: "Example: We declined this QTS application as you already have another application in progress."
legend:
assessor_interface_assessment_recommendation_form:
recommendation: QTS review completed
assessor_interface_assessment_section_form:
selected_failure_reasons: What are the reasons for your recommendation?
scotland_full_registration: Does the applicant have or are they eligible for full registration?
Expand Down

0 comments on commit d7a21b0

Please sign in to comment.