Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve how regional content is shown #2173

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading