From 22c86f017eaf9ea330d76eef26503fdfbedf5896 Mon Sep 17 00:00:00 2001 From: mariosh-e <166138805+mariosh-e@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:05:09 +0000 Subject: [PATCH 1/2] Added (opens in a new tab) to privacy link --- app/components/content/adviser_component.html.erb | 2 +- app/components/content/mailing_list_component.html.erb | 2 +- app/components/home/mailing_list_component.html.erb | 2 +- app/views/callbacks/steps/_personal_details.html.erb | 2 +- app/views/event_steps/_personal_details.html.erb | 2 +- app/views/mailing_list/steps/_name.html.erb | 2 +- app/views/teacher_training_adviser/steps/_identity.html.erb | 2 +- spec/components/content/adviser_component_spec.rb | 2 +- spec/components/content/mailing_list_component_spec.rb | 2 +- spec/components/home/mailing_list_component_spec.rb | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/components/content/adviser_component.html.erb b/app/components/content/adviser_component.html.erb index 1bbb69c31c..321d06a3d8 100644 --- a/app/components/content/adviser_component.html.erb +++ b/app/components/content/adviser_component.html.erb @@ -19,7 +19,7 @@ <%= f.hidden_field :sub_channel_id, value: f.object&.sub_channel_id.presence || params[:sub_channel] %> <%= f.hidden_field :accepted_policy_id, value: privacy_policy.id %> -
Your details are protected under the terms of our <%= link_to("privacy notice", privacy_policy_path(id: privacy_policy.id), { class: "link--black", target: :blank }) %>.
+Your details are protected under the terms of our <%= link_to("privacy notice (opens in a new tab)", privacy_policy_path(id: privacy_policy.id), { class: "link--black", target: :blank }) %>.
Our privacy notice explains how we use your personal data. It's important you read this before signing up to receive emails.
diff --git a/app/components/content/mailing_list_component.html.erb b/app/components/content/mailing_list_component.html.erb index b5d4d3941d..38cf5a03e4 100644 --- a/app/components/content/mailing_list_component.html.erb +++ b/app/components/content/mailing_list_component.html.erb @@ -19,7 +19,7 @@ <%= f.hidden_field :sub_channel_id, value: params[:sub_channel] || f.object&.sub_channel_id.presence %> <%= f.hidden_field :accepted_policy_id, value: privacy_policy.id %> -Your details are protected under the terms of our <%= link_to("privacy notice", privacy_policy_path(id: privacy_policy.id), { class: "link--black", target: :blank }) %>.
+Your details are protected under the terms of our <%= link_to("privacy notice (opens in a new tab)", privacy_policy_path(id: privacy_policy.id), { class: "link--black", target: :blank }) %>.
Our privacy notice explains how we use your personal data. It's important you read this before signing up to receive emails.
diff --git a/app/components/home/mailing_list_component.html.erb b/app/components/home/mailing_list_component.html.erb index 07d09c541e..0f08af704f 100644 --- a/app/components/home/mailing_list_component.html.erb +++ b/app/components/home/mailing_list_component.html.erb @@ -14,7 +14,7 @@- Your details are protected under the terms of our <%= link_to("privacy notice", privacy_policy_path(id: privacy_policy.id), { class: "link--black", target: :blank }) %>. This explains how we use your personal data. It's important you read it before signing up to receive emails. + Your details are protected under the terms of our <%= link_to("privacy notice (opens in a new tab)", privacy_policy_path(id: privacy_policy.id), { class: "link--black", target: :blank }) %>. This explains how we use your personal data. It's important you read it before signing up to receive emails.
diff --git a/app/views/callbacks/steps/_personal_details.html.erb b/app/views/callbacks/steps/_personal_details.html.erb index fda7b84fdc..e4e68d5741 100644 --- a/app/views/callbacks/steps/_personal_details.html.erb +++ b/app/views/callbacks/steps/_personal_details.html.erb @@ -11,6 +11,6 @@ <%= f.govuk_email_field :email, autocomplete: "email", width: 'two-thirds' %> <%= f.hidden_field :accepted_policy_id, value: f.object.latest_privacy_policy.id %> -Your details are protected under the terms of our <%= link_to("privacy notice", privacy_policy_path(id: f.object.latest_privacy_policy.id), { target: :blank }) %>.
+Your details are protected under the terms of our <%= link_to("privacy notice (opens in a new tab)", privacy_policy_path(id: f.object.latest_privacy_policy.id), { target: :blank }) %>.
Our privacy notice explains how we use your personal data. It's important you read this before booking a callback.
diff --git a/app/views/event_steps/_personal_details.html.erb b/app/views/event_steps/_personal_details.html.erb index 340f80fe74..e5c4ced2b0 100644 --- a/app/views/event_steps/_personal_details.html.erb +++ b/app/views/event_steps/_personal_details.html.erb @@ -7,6 +7,6 @@ <%= f.hidden_field :channel_id, value: params[:channel] || f.object&.channel_id %> <%= f.hidden_field :sub_channel_id, value: params[:sub_channel] || f.object&.sub_channel_id %> -Your details are protected under the terms of our <%= link_to("privacy notice", privacy_policy_path(id: f.object.latest_privacy_policy.id), { target: :blank }) %>.
+Your details are protected under the terms of our <%= link_to("privacy notice (opens in a new tab)", privacy_policy_path(id: f.object.latest_privacy_policy.id), { target: :blank }) %>.
Our privacy notice explains how we use your personal data. It's important you read this before signing up for an event.
diff --git a/app/views/mailing_list/steps/_name.html.erb b/app/views/mailing_list/steps/_name.html.erb index 18263bbee8..c74c685f76 100644 --- a/app/views/mailing_list/steps/_name.html.erb +++ b/app/views/mailing_list/steps/_name.html.erb @@ -22,6 +22,6 @@ Find out how to get: <%= f.hidden_field :sub_channel_id, value: params[:sub_channel] || f.object.sub_channel_id %> <%= f.hidden_field :accepted_policy_id, value: f.object.latest_privacy_policy.id %> -Your details are protected under the terms of our <%= link_to("privacy notice", privacy_policy_path(id: f.object.latest_privacy_policy.id), { target: :blank }) %>.
+Your details are protected under the terms of our <%= link_to("privacy notice (opens in a new tab)", privacy_policy_path(id: f.object.latest_privacy_policy.id), { target: :blank }) %>.
Our privacy notice explains how we use your personal data. It's important you read this before signing up to receive emails.
diff --git a/app/views/teacher_training_adviser/steps/_identity.html.erb b/app/views/teacher_training_adviser/steps/_identity.html.erb index f971b5ed29..e9c035e721 100644 --- a/app/views/teacher_training_adviser/steps/_identity.html.erb +++ b/app/views/teacher_training_adviser/steps/_identity.html.erb @@ -34,6 +34,6 @@ <%= f.hidden_field :sub_channel_id, value: f.object.sub_channel_id.presence || params[:sub_channel] %> <%= f.hidden_field :accepted_policy_id, value: f.object.latest_privacy_policy.id %> -Your details are protected under the terms of our <%= link_to "privacy notice", privacy_policy_path(id: session[:privacy_policy_id].presence || GetIntoTeachingApiClient::PrivacyPoliciesApi.new.get_latest_privacy_policy.id), target: :blank %>.
+Your details are protected under the terms of our <%= link_to "privacy notice (opens in a new tab)", privacy_policy_path(id: session[:privacy_policy_id].presence || GetIntoTeachingApiClient::PrivacyPoliciesApi.new.get_latest_privacy_policy.id), target: :blank %>.
Our privacy notice explains how we use your personal data. It's important you read this before signing up to get support from an adviser.
diff --git a/spec/components/content/adviser_component_spec.rb b/spec/components/content/adviser_component_spec.rb index 4ee6b6ad85..75c5f7cab4 100644 --- a/spec/components/content/adviser_component_spec.rb +++ b/spec/components/content/adviser_component_spec.rb @@ -15,7 +15,7 @@ it { is_expected.to have_css("p", text: "intro") } it { is_expected.to have_css(".action-container--#{color}") } it { is_expected.to have_css("form") } - it { is_expected.to have_link("privacy notice", href: "/privacy-policy?id=123") } + it { is_expected.to have_link("privacy notice (opens in a new tab)", href: "/privacy-policy?id=123") } it { is_expected.not_to have_css(".action-container--no-margin") } context "when color is trasparent" do diff --git a/spec/components/content/mailing_list_component_spec.rb b/spec/components/content/mailing_list_component_spec.rb index a6271853db..46a184b90e 100644 --- a/spec/components/content/mailing_list_component_spec.rb +++ b/spec/components/content/mailing_list_component_spec.rb @@ -15,7 +15,7 @@ it { is_expected.to have_css("p", text: "intro") } it { is_expected.to have_css(".action-container--#{color}") } it { is_expected.to have_css("form") } - it { is_expected.to have_link("privacy notice", href: "/privacy-policy?id=123") } + it { is_expected.to have_link("privacy notice (opens in a new tab)", href: "/privacy-policy?id=123") } it { is_expected.not_to have_css(".action-container--no-margin") } context "when color is trasparent" do diff --git a/spec/components/home/mailing_list_component_spec.rb b/spec/components/home/mailing_list_component_spec.rb index 3b73908800..833d2f375b 100644 --- a/spec/components/home/mailing_list_component_spec.rb +++ b/spec/components/home/mailing_list_component_spec.rb @@ -11,5 +11,5 @@ it { is_expected.to have_css(".home-mailing-list") } it { is_expected.to have_css("h2") } it { is_expected.to have_css("form") } - it { is_expected.to have_link("privacy notice", href: "/privacy-policy?id=123") } + it { is_expected.to have_link("privacy notice (opens in a new tab)", href: "/privacy-policy?id=123") } end From 20e1a482d36a34c749d13fe18c11761a9a7c0a9b Mon Sep 17 00:00:00 2001 From: mariosh-e <166138805+mariosh-e@users.noreply.github.com> Date: Wed, 9 Oct 2024 09:44:45 +0100 Subject: [PATCH 2/2] Apply suggestions from code review changed to 'opens in new tab' --- app/components/content/adviser_component.html.erb | 2 +- app/components/content/mailing_list_component.html.erb | 2 +- app/components/home/mailing_list_component.html.erb | 2 +- app/views/callbacks/steps/_personal_details.html.erb | 2 +- app/views/event_steps/_personal_details.html.erb | 2 +- app/views/mailing_list/steps/_name.html.erb | 2 +- app/views/teacher_training_adviser/steps/_identity.html.erb | 2 +- spec/components/content/adviser_component_spec.rb | 2 +- spec/components/content/mailing_list_component_spec.rb | 2 +- spec/components/home/mailing_list_component_spec.rb | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/components/content/adviser_component.html.erb b/app/components/content/adviser_component.html.erb index 321d06a3d8..6133530392 100644 --- a/app/components/content/adviser_component.html.erb +++ b/app/components/content/adviser_component.html.erb @@ -19,7 +19,7 @@ <%= f.hidden_field :sub_channel_id, value: f.object&.sub_channel_id.presence || params[:sub_channel] %> <%= f.hidden_field :accepted_policy_id, value: privacy_policy.id %> -Your details are protected under the terms of our <%= link_to("privacy notice (opens in a new tab)", privacy_policy_path(id: privacy_policy.id), { class: "link--black", target: :blank }) %>.
+Your details are protected under the terms of our <%= link_to("privacy notice (opens in new tab)", privacy_policy_path(id: privacy_policy.id), { class: "link--black", target: :blank }) %>.
Our privacy notice explains how we use your personal data. It's important you read this before signing up to receive emails.
diff --git a/app/components/content/mailing_list_component.html.erb b/app/components/content/mailing_list_component.html.erb index 38cf5a03e4..b34e71b69c 100644 --- a/app/components/content/mailing_list_component.html.erb +++ b/app/components/content/mailing_list_component.html.erb @@ -19,7 +19,7 @@ <%= f.hidden_field :sub_channel_id, value: params[:sub_channel] || f.object&.sub_channel_id.presence %> <%= f.hidden_field :accepted_policy_id, value: privacy_policy.id %> -Your details are protected under the terms of our <%= link_to("privacy notice (opens in a new tab)", privacy_policy_path(id: privacy_policy.id), { class: "link--black", target: :blank }) %>.
+Your details are protected under the terms of our <%= link_to("privacy notice (opens in new tab)", privacy_policy_path(id: privacy_policy.id), { class: "link--black", target: :blank }) %>.
Our privacy notice explains how we use your personal data. It's important you read this before signing up to receive emails.
diff --git a/app/components/home/mailing_list_component.html.erb b/app/components/home/mailing_list_component.html.erb index 0f08af704f..c42bb721bd 100644 --- a/app/components/home/mailing_list_component.html.erb +++ b/app/components/home/mailing_list_component.html.erb @@ -14,7 +14,7 @@- Your details are protected under the terms of our <%= link_to("privacy notice (opens in a new tab)", privacy_policy_path(id: privacy_policy.id), { class: "link--black", target: :blank }) %>. This explains how we use your personal data. It's important you read it before signing up to receive emails. + Your details are protected under the terms of our <%= link_to("privacy notice (opens in new tab)", privacy_policy_path(id: privacy_policy.id), { class: "link--black", target: :blank }) %>. This explains how we use your personal data. It's important you read it before signing up to receive emails.
diff --git a/app/views/callbacks/steps/_personal_details.html.erb b/app/views/callbacks/steps/_personal_details.html.erb index e4e68d5741..c0f972bc53 100644 --- a/app/views/callbacks/steps/_personal_details.html.erb +++ b/app/views/callbacks/steps/_personal_details.html.erb @@ -11,6 +11,6 @@ <%= f.govuk_email_field :email, autocomplete: "email", width: 'two-thirds' %> <%= f.hidden_field :accepted_policy_id, value: f.object.latest_privacy_policy.id %> -Your details are protected under the terms of our <%= link_to("privacy notice (opens in a new tab)", privacy_policy_path(id: f.object.latest_privacy_policy.id), { target: :blank }) %>.
+Your details are protected under the terms of our <%= link_to("privacy notice (opens in new tab)", privacy_policy_path(id: f.object.latest_privacy_policy.id), { target: :blank }) %>.
Our privacy notice explains how we use your personal data. It's important you read this before booking a callback.
diff --git a/app/views/event_steps/_personal_details.html.erb b/app/views/event_steps/_personal_details.html.erb index e5c4ced2b0..5a6880277b 100644 --- a/app/views/event_steps/_personal_details.html.erb +++ b/app/views/event_steps/_personal_details.html.erb @@ -7,6 +7,6 @@ <%= f.hidden_field :channel_id, value: params[:channel] || f.object&.channel_id %> <%= f.hidden_field :sub_channel_id, value: params[:sub_channel] || f.object&.sub_channel_id %> -Your details are protected under the terms of our <%= link_to("privacy notice (opens in a new tab)", privacy_policy_path(id: f.object.latest_privacy_policy.id), { target: :blank }) %>.
+Your details are protected under the terms of our <%= link_to("privacy notice (opens in new tab)", privacy_policy_path(id: f.object.latest_privacy_policy.id), { target: :blank }) %>.
Our privacy notice explains how we use your personal data. It's important you read this before signing up for an event.
diff --git a/app/views/mailing_list/steps/_name.html.erb b/app/views/mailing_list/steps/_name.html.erb index c74c685f76..46dd8f430a 100644 --- a/app/views/mailing_list/steps/_name.html.erb +++ b/app/views/mailing_list/steps/_name.html.erb @@ -22,6 +22,6 @@ Find out how to get: <%= f.hidden_field :sub_channel_id, value: params[:sub_channel] || f.object.sub_channel_id %> <%= f.hidden_field :accepted_policy_id, value: f.object.latest_privacy_policy.id %> -Your details are protected under the terms of our <%= link_to("privacy notice (opens in a new tab)", privacy_policy_path(id: f.object.latest_privacy_policy.id), { target: :blank }) %>.
+Your details are protected under the terms of our <%= link_to("privacy notice (opens in new tab)", privacy_policy_path(id: f.object.latest_privacy_policy.id), { target: :blank }) %>.
Our privacy notice explains how we use your personal data. It's important you read this before signing up to receive emails.
diff --git a/app/views/teacher_training_adviser/steps/_identity.html.erb b/app/views/teacher_training_adviser/steps/_identity.html.erb index e9c035e721..f8987bd55a 100644 --- a/app/views/teacher_training_adviser/steps/_identity.html.erb +++ b/app/views/teacher_training_adviser/steps/_identity.html.erb @@ -34,6 +34,6 @@ <%= f.hidden_field :sub_channel_id, value: f.object.sub_channel_id.presence || params[:sub_channel] %> <%= f.hidden_field :accepted_policy_id, value: f.object.latest_privacy_policy.id %> -Your details are protected under the terms of our <%= link_to "privacy notice (opens in a new tab)", privacy_policy_path(id: session[:privacy_policy_id].presence || GetIntoTeachingApiClient::PrivacyPoliciesApi.new.get_latest_privacy_policy.id), target: :blank %>.
+Your details are protected under the terms of our <%= link_to "privacy notice (opens in new tab)", privacy_policy_path(id: session[:privacy_policy_id].presence || GetIntoTeachingApiClient::PrivacyPoliciesApi.new.get_latest_privacy_policy.id), target: :blank %>.
Our privacy notice explains how we use your personal data. It's important you read this before signing up to get support from an adviser.
diff --git a/spec/components/content/adviser_component_spec.rb b/spec/components/content/adviser_component_spec.rb index 75c5f7cab4..c91be35034 100644 --- a/spec/components/content/adviser_component_spec.rb +++ b/spec/components/content/adviser_component_spec.rb @@ -15,7 +15,7 @@ it { is_expected.to have_css("p", text: "intro") } it { is_expected.to have_css(".action-container--#{color}") } it { is_expected.to have_css("form") } - it { is_expected.to have_link("privacy notice (opens in a new tab)", href: "/privacy-policy?id=123") } + it { is_expected.to have_link("privacy notice (opens in new tab)", href: "/privacy-policy?id=123") } it { is_expected.not_to have_css(".action-container--no-margin") } context "when color is trasparent" do diff --git a/spec/components/content/mailing_list_component_spec.rb b/spec/components/content/mailing_list_component_spec.rb index 46a184b90e..bde2e7b31c 100644 --- a/spec/components/content/mailing_list_component_spec.rb +++ b/spec/components/content/mailing_list_component_spec.rb @@ -15,7 +15,7 @@ it { is_expected.to have_css("p", text: "intro") } it { is_expected.to have_css(".action-container--#{color}") } it { is_expected.to have_css("form") } - it { is_expected.to have_link("privacy notice (opens in a new tab)", href: "/privacy-policy?id=123") } + it { is_expected.to have_link("privacy notice (opens in new tab)", href: "/privacy-policy?id=123") } it { is_expected.not_to have_css(".action-container--no-margin") } context "when color is trasparent" do diff --git a/spec/components/home/mailing_list_component_spec.rb b/spec/components/home/mailing_list_component_spec.rb index 833d2f375b..1153105a61 100644 --- a/spec/components/home/mailing_list_component_spec.rb +++ b/spec/components/home/mailing_list_component_spec.rb @@ -11,5 +11,5 @@ it { is_expected.to have_css(".home-mailing-list") } it { is_expected.to have_css("h2") } it { is_expected.to have_css("form") } - it { is_expected.to have_link("privacy notice (opens in a new tab)", href: "/privacy-policy?id=123") } + it { is_expected.to have_link("privacy notice (opens in new tab)", href: "/privacy-policy?id=123") } end