Skip to content

Commit

Permalink
Improve how regional content is shown
Browse files Browse the repository at this point in the history
This standardises how we show region content and ensures that any
content related to the written statement (from the status or the
sanction checks) are shown in the request professional standing
certificate page.
  • Loading branch information
thomasleese committed Apr 25, 2024
1 parent 84ee108 commit 15c03da
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,13 @@ def check_collection

def new
qualification = Qualification.new(application_form:)
@view_object = QualificationViewObject.new(qualification:)

@form = QualificationForm.new(qualification:)
end

def create
qualification = Qualification.new(application_form:)

@view_object = QualificationViewObject.new(qualification:)

@form =
QualificationForm.new(qualification_form_params.merge(qualification:))

Expand Down Expand Up @@ -158,8 +156,6 @@ def submit_add_another
def edit
@qualification = qualification

@view_object = QualificationViewObject.new(qualification:)

@form =
QualificationForm.new(
qualification:,
Expand All @@ -176,8 +172,6 @@ def edit
def update
@qualification = qualification

@view_object = QualificationViewObject.new(qualification:)

@form =
QualificationForm.new(qualification_form_params.merge(qualification:))

Expand Down
18 changes: 0 additions & 18 deletions app/view_objects/teacher_interface/qualification_view_object.rb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,44 @@
<h2 class="govuk-heading-m">You should now request your <%= region_certificate_name(view_object.region) %></h2>
<p class="govuk-body">You should now request your <%= region_certificate_name(view_object.region) %> from <%= region_teaching_authority_name(view_object.region) %>.</p>
<p class="govuk-body">Contact them directly and instruct them to send the document to <%= govuk_link_to t("service.email.verification"), email_path("verification") %>.</p>
<h2 class="govuk-heading-m">Important information about your <%= region_certificate_name(view_object.region) %></h2>
<p class="govuk-body">Once you've submitted your application, we’ll notify <%= region_teaching_authority_name(view_object.region) %> that you’ve applied for QTS. You do not need to contact us to get written confirmation of this.</p>
<h2 class="govuk-heading-m">
You should now request your <%= region_certificate_name(view_object.region) %>
</h2>

<p class="govuk-body">
You should now request your <%= region_certificate_name(view_object.region) %> from <%= region_teaching_authority_name_phrase(view_object.region) %>.
</p>

<p class="govuk-body">
Contact them directly and instruct them to send the document to <%= govuk_link_to t("service.email.verification"), email_path("verification") %>.
</p>

<% if view_object.region.teaching_authority_requires_submission_email %>
<p class="govuk-body">
Once you’ve submitted your application, we’ll notify <%= region_teaching_authority_name_phrase(view_object.region) %> that you’ve applied for QTS. You do not need to contact us to get written confirmation of this.
</p>
<% end %>

<h2 class="govuk-heading-m">
Important information about your <%= region_certificate_name(view_object.region) %>
</h2>

<% if view_object.region.status_check_written? %>
<% if view_object.region.status_information.present? %>
<%= raw GovukMarkdown.render(view_object.region.status_information) %>
<% end %>

<% if view_object.region.country.status_information.present? %>
<%= raw GovukMarkdown.render(view_object.region.country.status_information) %>
<% end %>
<% end %>

<% if view_object.region.sanction_check_written? %>
<% if view_object.region.sanction_information.present? %>
<%= raw GovukMarkdown.render(view_object.region.sanction_information) %>
<% end %>

<% if view_object.region.country.sanction_information.present? %>
<%= raw GovukMarkdown.render(view_object.region.country.sanction_information) %>
<% end %>
<% end %>

<% if view_object.region.other_information.present? %>
<%= raw GovukMarkdown.render(view_object.region.other_information) %>
Expand Down
10 changes: 8 additions & 2 deletions app/views/teacher_interface/qualifications/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@
<p class="govuk-body">Add any additional qualifications you have that relate to your teaching career. These must be of a <%= govuk_link_to "UK ‘level 6’ equivalent or above", "https://www.gov.uk/what-different-qualification-levels-mean/list-of-qualification-levels" %>.</p>
<% end %>

<% if view_object.qualifications_information.present? %>
<% if @application_form.region.qualifications_information.present? || @application_form.region.country.qualifications_information.present? %>
<section id="app-qualifications-information">
<%= raw GovukMarkdown.render(view_object.qualifications_information) %>
<% if @application_form.region.qualifications_information.present? %>
<%= raw GovukMarkdown.render(@application_form.region.qualifications_information) %>
<% end %>

<% if @application_form.region.country.qualifications_information.present? %>
<%= raw GovukMarkdown.render(@application_form.region.country.qualifications_information) %>
<% end %>
</section>
<% end %>

Expand Down

This file was deleted.

0 comments on commit 15c03da

Please sign in to comment.