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

Rename accredited partnership concepts #4808

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion app/components/accredited_provider_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%= govuk_summary_card(title: provider_name) do |card|
card.with_action { govuk_link_to("Remove", remove_path, class: "app-link--destructive govuk-!-font-weight-regular", data: { qa: "remove-link" }) }
card.with_summary_list(rows: [{ key: { text: "About the accredited provider" },
card.with_summary_list(rows: [{ key: { text: "About the accredited partner" },
value: { text: markdown(about_accredited_provider) },
actions: [{ href: change_about_accredited_provider_path }] }])
end %>
4 changes: 2 additions & 2 deletions app/components/add_course_button.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def incomplete_sections_hash

def incomplete_section_label_suffix(section)
labels = {
accredited_provider_not_present?: 'accredited provider',
accredited_provider_not_present?: 'accredited partner',
site_not_present?: 'school'
}

Expand Down Expand Up @@ -64,6 +64,6 @@ def accredited_provider?
end

def incomplete_section_article(section)
incomplete_section_label_suffix(section) == 'accredited provider' ? 'an' : 'a'
incomplete_section_label_suffix(section) == 'accredited partner' ? 'an' : 'a'
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def update
if update_params[:accredited_provider_code] == 'other'
redirect_to_provider_search
elsif @course.update(update_params)
course_updated_message('Accredited provider')
course_updated_message('Ratifying partner')
redirect_to_update_successful
else
@errors = @course.errors.messages
Expand Down Expand Up @@ -127,7 +127,7 @@ def errors_for_search_query(code, query)
if other_selected_with_no_autocompleted_code?(code) && query.length < 2
errors = { accredited_provider: ['Accredited provider search too short, enter 2 or more characters'] }
elsif code.blank?
errors = { accredited_provider_code: ['Select an accredited provider'] }
errors = { accredited_provider_code: ['Select a ratifying partner'] }
end

errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def show

def update
accredited_provider_form.save!
redirect_to publish_provider_recruitment_cycle_accredited_providers_path(@provider.provider_code, @provider.recruitment_cycle_year), flash: { success: 'Accredited provider added' }
redirect_to publish_provider_recruitment_cycle_accredited_providers_path(@provider.provider_code, @provider.recruitment_cycle_year), flash: { success: 'Accredited partner added' }
end

private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def update

redirect_to support_recruitment_cycle_provider_accredited_providers_path(
recruitment_cycle.year, provider.id
), flash: { success: 'Accredited provider added' }
), flash: { success: 'Accredited partner added' }
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/navigation_bar_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def navigation_items(provider)
{ name: t('navigation_bar.study_sites'), url: publish_provider_recruitment_cycle_study_sites_path(provider.provider_code, provider.recruitment_cycle_year) },
{ name: t('navigation_bar.users'), url: publish_provider_users_path(provider_code: provider.provider_code), additional_url: request_access_publish_provider_path(provider.provider_code) },
*([name: t('navigation_bar.training_partners'), url: publish_provider_recruitment_cycle_training_providers_path(provider.provider_code, provider.recruitment_cycle_year)] if provider.accredited_provider?),
*([name: t('navigation_bar.accredited_provider'), url: publish_provider_recruitment_cycle_accredited_providers_path(provider.provider_code, provider.recruitment_cycle_year)] unless provider.accredited_provider?),
*([name: t('navigation_bar.accredited_partnerships'), url: publish_provider_recruitment_cycle_accredited_providers_path(provider.provider_code, provider.recruitment_cycle_year)] unless provider.accredited_provider?),
{ name: t('navigation_bar.organisation_details'), url: details_publish_provider_recruitment_cycle_path(provider.provider_code, provider.recruitment_cycle_year) }
]
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/provider_record.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{ name: "Users", url: support_recruitment_cycle_provider_users_path(@provider.recruitment_cycle_year, @provider) },
{ name: "Courses", url: support_recruitment_cycle_provider_courses_path(@provider.recruitment_cycle_year, @provider) },
{ name: "Schools", url: support_recruitment_cycle_provider_schools_path(@provider.recruitment_cycle_year, @provider) },
*([{ name: "Accredited providers", url: support_recruitment_cycle_provider_accredited_providers_path(@provider.recruitment_cycle_year, @provider) }] unless @provider.accredited_provider?)
*([{ name: "Accredited partnerships", url: support_recruitment_cycle_provider_accredited_providers_path(@provider.recruitment_cycle_year, @provider) }] unless @provider.accredited_provider?)
]) %>

<%= yield %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<%= govuk_breadcrumbs(breadcrumbs: [
govuk_breadcrumb_link_to("Home", root_path),
govuk_breadcrumb_link_to("How to use this service", how_to_use_this_service_path),
govuk_breadcrumb_link_to("Change an accredited provider relationship",
govuk_breadcrumb_link_to("Change an accredited partnership",
change_an_accredited_provider_relationship_path)
]) %>

Expand All @@ -16,43 +16,43 @@

<h1 class="govuk-heading-l">
<span class="govuk-caption-l">How to use this service</span>
Change an accredited provider relationship
Change an accredited partnership
</h1>

<p class="govuk-body">
If you’re a training partner (non-accredited provider), we need to know who you work with to run your courses.
</p>

<h2 class="govuk-heading-m">Adding and deleting an accredited provider</h2>
<h2 class="govuk-heading-m">Adding and deleting an accredited partnership</h2>

<p class="govuk-body">
You need to select which accredited provider ratifies a course before you can publish it. You’ll also need to write a short description about the accredited provider. It’s a good idea to ask the accredited provider to check this content and approve it.
You need to select which accredited partner ratifies a course before you can publish it. You’ll also need to write a short description about the accredited partner. It’s a good idea to ask the accredited partner to check this content and approve it.
</p>

<p class="govuk-body">Go to the ‘Accredited providers’ tab in your account to:</p>
<p class="govuk-body">Go to the ‘Accredited partnerships’ tab in your account to:</p>

<ul class="govuk-list govuk-list--bullet">
<li>add new accredited providers</li>
<li>add new accredited partners</li>
<li>update descriptions</li>
<li>remove accredited providers from your account (unpublished courses only)</li>
<li>remove accredited partners from your account (unpublished courses only)</li>
</ul>

<p class="govuk-body">
You’ll be asked to specify which accredited provider you’re working with for each course before you can publish it.
You’ll be asked to specify which accredited partner you’re working with for each course before you can publish it.
</p>

<p class="govuk-body">
If you want to give people at the accredited provider organisation access to your courses, you can <%= govuk_link_to("add them as a user", add_and_remove_users_path) %>.
If you want to give people at the accredited partner organisation access to your courses, you can <%= govuk_link_to("add them as a user", add_and_remove_users_path) %>.
</p>

<h2 class="govuk-heading-m">Changing your accredited provider</h2>
<h2 class="govuk-heading-m">Changing your ratifying partner</h2>

<p class="govuk-body">
If the organisation you were working with is no longer an accredited provider, you’ll need to select a different provider before publishing any new courses. You’ll be prompted to do this when <%= govuk_link_to("publishing rolled over courses", roll_over_courses_to_a_new_recruitment_cycle_path) %>.
If the organisation you were working with is no longer an accredited provider, you’ll need to select a different partner before publishing any new courses. You’ll be prompted to do this when <%= govuk_link_to("publishing rolled over courses", roll_over_courses_to_a_new_recruitment_cycle_path) %>.
</p>

<p class="govuk-body">
If you need to change an accredited provider for a course that has already been published on Find, contact us at
If you need to change an ratifying partner for a course that has already been published on Find, contact us at
<a class="govuk-link" href="mailto:<%= Settings.support_email %>">
<%= Settings.support_email %></a>.
</p>
Expand Down
2 changes: 1 addition & 1 deletion app/views/pages/how_to_use_this_service.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<ul class="govuk-list govuk-list--spaced">
<li><%= govuk_link_to "Add an organisation", add_an_organisation_path %></li>
<li><%= govuk_link_to "Add and remove users", add_and_remove_users_path %></li>
<li><%= govuk_link_to "Change an accredited provider relationship", change_an_accredited_provider_relationship_path %></li>
<li><%= govuk_link_to "Change an accredited partnership", change_an_accredited_provider_relationship_path %></li>
</ul>

<h2 class="govuk-heading-m">Managing courses</h2>
Expand Down
10 changes: 5 additions & 5 deletions app/views/publish/courses/_basic_details_tab.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -153,21 +153,21 @@
end

unless @provider.accredited_provider?
summary_list.with_row(html_attributes: { data: { qa: "course__accredited_provider" } }) do |row|
row.with_key { "Accredited provider" }
summary_list.with_row(html_attributes: { data: { qa: "course__ratifying_partner" } }) do |row|
row.with_key { "Ratifying partner" }
row.with_value { course.accrediting_provider&.provider_name }
if course.is_published? || course.is_withdrawn?
row.with_action
elsif !course.accrediting_provider.nil?
row.with_action(href: accredited_provider_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code),
visually_hidden_text: "accredited provider")
visually_hidden_text: "ratifying partner")
elsif @provider.accredited_providers.any?
row.with_value do
"<div class=\"govuk-inset-text app-inset-text--narrow-border app-inset-text--important\">#{govuk_link_to('Select an accredited provider', accredited_provider_publish_provider_recruitment_cycle_course_path(@course.provider_code, @course.recruitment_cycle_year, @course.course_code))}</div>".html_safe
"<div class=\"govuk-inset-text app-inset-text--narrow-border app-inset-text--important\">#{govuk_link_to('Select an accredited partner', accredited_provider_publish_provider_recruitment_cycle_course_path(@course.provider_code, @course.recruitment_cycle_year, @course.course_code))}</div>".html_safe
end
else
row.with_value do
"<div class=\"govuk-inset-text app-inset-text--narrow-border app-inset-text--important\">#{govuk_link_to('Add at least one accredited provider', publish_provider_recruitment_cycle_accredited_providers_path(@course.provider_code, @course.recruitment_cycle_year))}</div>".html_safe
"<div class=\"govuk-inset-text app-inset-text--narrow-border app-inset-text--important\">#{govuk_link_to('Add at least one accredited partner', publish_provider_recruitment_cycle_accredited_providers_path(@course.provider_code, @course.recruitment_cycle_year))}</div>".html_safe
end
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="govuk-radios__item" data-qa="course__accredited_provider_option">
<div class="govuk-radios__item" data-qa="course__ratifying_partner_option">
<%= form.radio_button :accredited_provider_code,
provider_suggestion[:provider_code],
checked: provider_suggestion[:provider_code] == @course.accrediting_provider&.provider_code,
Expand Down
10 changes: 5 additions & 5 deletions app/views/publish/courses/accredited_provider/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% content_for :page_title, title_with_error_prefix("Accredited provider – #{course.name_and_code}", course.errors.any?) %>
<% content_for :page_title, title_with_error_prefix("Ratifying partner – #{course.name_and_code}", course.errors.any?) %>

<% content_for :before_content do %>
<%= govuk_back_link_to(details_publish_provider_recruitment_cycle_course_path(course.provider_code, course.recruitment_cycle_year, course.course_code)) %>
Expand All @@ -10,7 +10,7 @@
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
<%= render CaptionText.new(text: course.name_and_code) %>
Accredited provider
Ratifying partner
</h1>
</legend>

Expand All @@ -20,14 +20,14 @@
url: accredited_provider_publish_provider_recruitment_cycle_course_path(@course.provider_code, @course.recruitment_cycle_year, @course.course_code),
method: :put do |form| %>

<div class="govuk-radios govuk-!-margin-top-2" data-module="govuk-radios" data-qa="course__accredited_provider">
<div class="govuk-radios govuk-!-margin-top-2" data-module="govuk-radios" data-qa="course__ratifying_partner">
<%= render partial: "provider_suggestion", collection: @provider.accredited_bodies, locals: { form: } %>
</div>

<div class="govuk-button-group">
<%= form.submit "Update accredited provider", class: "govuk-button govuk-!-margin-top-5", data: { qa: "course__save" } %>
<%= form.submit "Update ratifying partner", class: "govuk-button govuk-!-margin-top-5", data: { qa: "course__save" } %>
<%= govuk_link_to(
"Add accredited provider",
"Add accredited partner",
search_publish_provider_recruitment_cycle_accredited_providers_path(course.provider_code, course.recruitment_cycle_year),
class: "govuk-!-margin-bottom-6 govuk-!-margin-top-5",
data: { qa: "course__add" }
Expand Down
8 changes: 4 additions & 4 deletions app/views/publish/courses/accredited_provider/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% content_for :page_title, title_with_error_prefix("Accredited provider – #{course.name_and_code}", @errors && @errors.any?) %>
<% content_for :page_title, title_with_error_prefix("Ratifying partner – #{course.name_and_code}", @errors && @errors.any?) %>

<% content_for :before_content do %>
<%= govuk_back_link_to(@back_link_path) %>
Expand All @@ -9,17 +9,17 @@
<div class="govuk-grid-column-full">
<%= form_with url: continue_publish_provider_recruitment_cycle_courses_accredited_provider_path(@provider.provider_code, @provider.recruitment_cycle_year), method: :get do |form| %>
<%= render "publish/courses/new_fields_holder", form:, except_keys: [:accredited_provider_code] do |fields| %>
<%= render "publish/shared/error_wrapper", error_keys: [:accredited_provider_code], data_qa: "course__accredited_provider" do %>
<%= render "publish/shared/error_wrapper", error_keys: [:accredited_provider_code], data_qa: "course__ratifying_partner" do %>
<fieldset class="govuk-fieldset">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
<h1 class="govuk-fieldset__heading">
<%= render CaptionText.new(text: t("course.add_course")) %>
Accredited provider
Ratifying partner
</h1>
</legend>
<%= render "publish/shared/error_messages", error_keys: [:accredited_provider_code] %>

<div class="govuk-radios" data-module="govuk-radios" data-qa="course__accredited_provider">
<div class="govuk-radios" data-module="govuk-radios" data-qa="course__ratifying_partner">
<% if @provider.accredited_bodies.length > 0 %>
<%= render partial: "provider_suggestion", collection: @provider.accredited_bodies.sort_by { |k| k[:provider_name] }, locals: { form: fields } %>
<% else %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l">
Pick an accredited provider
Pick an accredited partner
</h1>

<p class="govuk-body">You searched for ‘<%= @query %>’.</p>
Expand All @@ -21,7 +21,7 @@
<% if @provider_suggestions.any? %>
<p class="govuk-body">We found these providers which matched your search:</p>

<div class="govuk-radios" data-module="govuk-radios" data-qa="course__accredited_provider">
<div class="govuk-radios" data-module="govuk-radios" data-qa="course__ratifying_partner">
<%= render partial: "provider_suggestion", collection: @provider_suggestions, locals: { form: } %>
<div class="govuk-radios__divider">or</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l">
Pick an accredited provider
Pick an accredited partner
</h1>

<p class="govuk-body">You searched for ‘<%= @query %>’.</p>
Expand All @@ -25,7 +25,7 @@
<% if @provider_suggestions.any? %>
<p class="govuk-body">We found these providers which matched your search:</p>

<div class="govuk-radios" data-module="govuk-radios" data-qa="course__accredited_provider">
<div class="govuk-radios" data-module="govuk-radios" data-qa="course__ratifying_partner">
<%= render partial: "provider_suggestion", collection: @provider_suggestions, locals: { form: } %>
<div class="govuk-radios__divider">or</div>

Expand Down
6 changes: 3 additions & 3 deletions app/views/publish/courses/confirmation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@
<% end %>

<% unless @provider.accredited_provider? || course.is_further_education? %>
<% summary_list.with_row(html_attributes: { data: { qa: "course__accredited_provider" } }) do |row| %>
<% row.with_key { "Accredited provider" } %>
<% summary_list.with_row(html_attributes: { data: { qa: "course__ratifying_partner" } }) do |row| %>
<% row.with_key { "Ratifying partner" } %>
<% row.with_value { course.accrediting_provider.provider_name } %>
<% if @provider.accredited_bodies.length > 1 %>
<% row.with_action(
href: new_publish_provider_recruitment_cycle_courses_accredited_provider_path(course.provider.provider_code, course.recruitment_cycle.year, params.to_unsafe_h.merge(goto_confirmation: true)),
visually_hidden_text: "accredited provider"
visually_hidden_text: "ratifying partner"
) %>
<% else %>
<% row.with_action %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/publish/courses/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<% @courses_by_accrediting_provider.each do |accrediting_provider, courses| %>
<section data-qa="courses__table-section">
<h2 class="govuk-heading-m">
<span class="govuk-caption-m">Accredited provider</span>
<span class="govuk-caption-m">Ratifying partner</span>
<%= accrediting_provider %>
</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<%= render search_result_title_component %>

<% unless @accredited_provider_search.providers.empty? %>
<%= f.govuk_radio_buttons_fieldset(:provider_id, legend: { text: "Accredited provider", size: "m" }) do %>
<%= f.govuk_radio_buttons_fieldset(:provider_id, legend: { text: "Accredited partner", size: "m" }) do %>
<% @accredited_provider_search.providers.each_with_index do |provider, index| %>
<%= f.govuk_radio_button :provider_id, provider.id, label: { text: provider.name_and_code }, link_errors: index.zero? %>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<%= t("publish.providers.accredited_providers.delete.title") %>
</h1>

<%= govuk_button_to "Remove accredited provider",
<%= govuk_button_to "Remove accredited partner",
delete_publish_provider_recruitment_cycle_accredited_provider_path,
method: :delete,
class: "govuk-button--warning" %>
Expand Down
Loading
Loading