diff --git a/app/decorators/service_provider_session_decorator.rb b/app/decorators/service_provider_session_decorator.rb index 277e7082f74..83ad7cce508 100644 --- a/app/decorators/service_provider_session_decorator.rb +++ b/app/decorators/service_provider_session_decorator.rb @@ -48,10 +48,6 @@ def new_session_heading I18n.t('headings.sign_in_with_sp', sp: sp_name) end - def registration_heading - 'sign_up/registrations/sp_registration_heading' - end - def verification_method_choice I18n.t('idv.messages.select_verification_with_sp', sp_name: sp_name) end diff --git a/app/decorators/session_decorator.rb b/app/decorators/session_decorator.rb index 82264af6e28..a08123fde07 100644 --- a/app/decorators/session_decorator.rb +++ b/app/decorators/session_decorator.rb @@ -3,10 +3,6 @@ def initialize(view_context: nil) @view_context = view_context end - def registration_heading - 'sign_up/registrations/registration_heading' - end - def new_session_heading I18n.t('headings.sign_in_without_sp') end diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 087b372f547..a719f4ba22f 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -9,11 +9,7 @@ <%= render 'shared/maintenance_window_alert' %> <% if decorated_session.sp_name %> -
- <%= image_tag(asset_url('user-access.svg'), width: '280', height: '91', alt: '') %> - - <%= render decorated_session.registration_heading %> -
+ <%= render 'sign_up/registrations/sp_registration_heading' %> <% else %> <%= render PageHeadingComponent.new.with_content(decorated_session.new_session_heading) %> <% end %> diff --git a/app/views/sign_up/registrations/_registration_heading.html.erb b/app/views/sign_up/registrations/_registration_heading.html.erb deleted file mode 100644 index 5c941a1c7d8..00000000000 --- a/app/views/sign_up/registrations/_registration_heading.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

- <%= t('headings.create_account_without_sp', app_name: APP_NAME) %> -

diff --git a/app/views/sign_up/registrations/_sp_registration_heading.html.erb b/app/views/sign_up/registrations/_sp_registration_heading.html.erb index 34953c3b444..9729c698dba 100644 --- a/app/views/sign_up/registrations/_sp_registration_heading.html.erb +++ b/app/views/sign_up/registrations/_sp_registration_heading.html.erb @@ -1,7 +1,7 @@ -

- - <%= decorated_session.sp_name %> - - - <%= t('headings.create_account_with_sp.sp_text', app_name: APP_NAME) %> -

+
+ <%= image_tag(asset_url('user-access.svg'), width: '280', height: '91', alt: '') %> +

+ <%= decorated_session.sp_name %> + <%= t('headings.create_account_with_sp.sp_text', app_name: APP_NAME) %> +

+
diff --git a/app/views/users/authorization_confirmation/new.html.erb b/app/views/users/authorization_confirmation/new.html.erb index a230ebfea75..0a9d09812a1 100644 --- a/app/views/users/authorization_confirmation/new.html.erb +++ b/app/views/users/authorization_confirmation/new.html.erb @@ -1,11 +1,7 @@ <% title t('titles.sign_up.confirmation') %> <% if decorated_session.sp_name %> -
- <%= image_tag(asset_url('user-access.svg'), width: '280', height: '91', alt: '') %> - - <%= render decorated_session.registration_heading %> -
+ <%= render 'sign_up/registrations/sp_registration_heading' %> <% else %> <%= render PageHeadingComponent.new.with_content(decorated_session.new_session_heading) %> <% end %> diff --git a/config/locales/headings/en.yml b/config/locales/headings/en.yml index fedd4b45093..e5a43d89591 100644 --- a/config/locales/headings/en.yml +++ b/config/locales/headings/en.yml @@ -26,7 +26,6 @@ en: cta: First time using %{app_name}? sp_text: is using %{app_name} to allow you to sign in to your account safely and securely. - create_account_without_sp: Create a %{app_name} account edit_info: password: Change your password phone: Manage your phone settings diff --git a/config/locales/headings/es.yml b/config/locales/headings/es.yml index 4a4e75dae54..01e8ebd575c 100644 --- a/config/locales/headings/es.yml +++ b/config/locales/headings/es.yml @@ -26,7 +26,6 @@ es: cta: '¿Es la primera vez que utiliza %{app_name}?' sp_text: está utilizando %{app_name} para permitirle iniciar sesión en su cuenta de forma segura. - create_account_without_sp: Establezca una cuenta de %{app_name} edit_info: password: Cambie su contraseña phone: Administrar la configuración de su teléfono diff --git a/config/locales/headings/fr.yml b/config/locales/headings/fr.yml index 5c2e4561aae..491d5073c65 100644 --- a/config/locales/headings/fr.yml +++ b/config/locales/headings/fr.yml @@ -26,7 +26,6 @@ fr: cta: Première fois que vous utilisez %{app_name}? sp_text: utilise %{app_name} pour vous permettre de vous connecter à votre compte de façon sûre et sécurisée. - create_account_without_sp: Créer un compte %{app_name} edit_info: password: Changez votre mot de passe phone: Administrer les paramètres de votre téléphone diff --git a/spec/decorators/session_decorator_spec.rb b/spec/decorators/session_decorator_spec.rb index 952f6f6cc9d..f8e0ee38504 100644 --- a/spec/decorators/session_decorator_spec.rb +++ b/spec/decorators/session_decorator_spec.rb @@ -9,12 +9,6 @@ end end - describe '#registration_heading' do - it 'returns the correct partial' do - expect(subject.registration_heading).to eq 'sign_up/registrations/registration_heading' - end - end - describe '#verification_method_choice' do it 'returns the correct string' do expect(subject.verification_method_choice).to eq(