Skip to content

Commit 45c5dbf

Browse files
authored
Merge pull request #12784 from demarche-numerique/hide_pro_connect
ETQ Usager, le bouton pro connect de m'est plus propose au mm niveau que FranceConnect
2 parents 3f4da94 + 7c3567f commit 45c5dbf

13 files changed

Lines changed: 91 additions & 11 deletions

File tree

app/controllers/pro_connect_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class ProConnectController < ApplicationController
1313
NONCE_COOKIE_NAME = :proConnect_nonce
1414

1515
def index
16-
redirect_to new_user_session_path, status: :moved_permanently
1716
end
1817

1918
def required; end

app/views/commencer/show.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
.fr-grid-row.fr-grid-row--gutters
1717
.fr-col-12.fr-col-lg-5
1818
= render partial: 'shared/france_connect_login', locals: { url: commencer_france_connect_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), heading_level: :h3, title: t('views.shared.france_connect_login.commencer_title') }
19-
= render ProConnectLoginComponent.new(url: commencer_pro_connect_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), heading_level: :h3, title: t('views.shared.france_connect_login.commencer_pc_title'))
19+
-# = render ProConnectLoginComponent.new(url: commencer_pro_connect_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), heading_level: :h3, title: t('views.shared.france_connect_login.commencer_pc_title'))
2020
.fr-hidden.fr-unhidden-lg.fr-col-lg-1
2121
.fr-vr-or{ role: "separator", "aria-orientation": "vertical" }
2222
%span= t('views.shared.france_connect_login.separator')

app/views/layouts/_header.haml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
- elsif request.path != new_user_session_path && !content_for?(:hide_header_login)
4444
- if request.path == new_user_registration_path
4545
%li.fr-hidden-sm.fr-unhidden-lg.fr-link--sm.fr-mr-1v= t('views.shared.account.already_user_question')
46+
%li= link_to 'Professionnel',
47+
content_for(:pro_connect_path) || pro_connect_path,
48+
class: "fr-btn fr-btn--tertiary fr-icon-government-fill fr-btn--icon-left"
4649
%li= link_to t('views.shared.account.signin'), new_user_session_path, class: "fr-btn fr-btn--tertiary fr-icon-account-circle-fill fr-btn--icon-left"
4750
4851
%li
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
- content_for(:title, t('.cta'))
2+
3+
#proconnect
4+
.fr-container
5+
.fr-grid-row.fr-grid-row--gutters.fr-mt-0
6+
7+
.fr-col-lg.fr-p-6w.fr-background-alt--blue-france
8+
9+
#session-new.auth-form.sign-in-form
10+
= form_for User.new, url: user_session_path do |f|
11+
12+
%h1.fr-h2= t('views.users.sessions.new.sign_in', application_name: Current.application_name)
13+
14+
.fr-mb-0.fr-fieldset
15+
.fr-fieldset__legend
16+
%h2.fr-h6= t('.cta')
17+
18+
.fr-fieldset__element
19+
%p= t('.explanation')
20+
21+
= render ProConnectLoginComponent.new
22+
23+
- if !params[:force_pro_connect]
24+
%p.fr-hr-or= t('views.shared.france_connect_login.separator')
25+
26+
%fieldset.fr-mb-0.fr-fieldset{ aria: { labelledby: 'new-account-legend' } }
27+
%legend.fr-fieldset__legend#new-account-legend
28+
%h2.fr-h6= t('views.users.sessions.new.subtitle')
29+
30+
.fr-fieldset__element
31+
%p.fr-text--sm= t('utils.asterisk_html')
32+
33+
.fr-fieldset__element
34+
= render Dsfr::InputComponent.new(form: f, attribute: :email, input_type: :email_field, opts: { autocomplete: 'email' }) do |c|
35+
- c.with_label { t('.pro_email') }
36+
37+
.fr-fieldset__element
38+
= render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field, opts: { autocomplete: 'current-password' })
39+
40+
%p= link_to t('views.users.sessions.new.reset_password'), new_user_password_path, class: "fr-link"
41+
42+
.fr-fieldset__element
43+
.auth-options
44+
.flex-no-shrink
45+
= f.check_box :remember_me
46+
= f.label :remember_me, t('views.users.sessions.new.remember_me'), class: 'remember-me'
47+
48+
.fr-btns-group= f.submit t('views.users.sessions.new.connection'), class: "fr-btn"
49+
50+
%hr
51+
52+
%h2.fr-h6= t('.you_are_a_citizen')
53+
.fr-btns-group= link_to t('.citizen_page'), new_user_session_path, class: "fr-btn fr-btn--secondary"
54+
55+
.fr-col-lg.fr-p-6w
56+
= render Dsfr::CalloutComponent.new(title: t('.full_deploy_title'), icon: 'fr-icon-information-line') do |c|
57+
- c.with_body do
58+
= t('.full_deploy_body')
59+
%h2.fr-h6= t('.whats_ds', application_name: Current.application_name)
60+
= image_tag "landing/hero/dematerialiser.svg", class: "fr-responsive-img", alt: ""

app/views/users/registrations/new.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
%h1.fr-h2= t('views.registrations.new.title', name: Current.application_name)
99

1010
= render partial: 'shared/france_connect_login', locals: { url: france_connect_path, title: t('views.shared.france_connect_login.signup_title') }
11-
= render ProConnectLoginComponent.new(title: t('views.shared.france_connect_login.signup_pc_title'))
11+
-# = render ProConnectLoginComponent.new(title: t('views.shared.france_connect_login.signup_pc_title'))
1212
1313
%p.fr-hr-or= t('views.shared.france_connect_login.separator')
1414

app/views/users/sessions/new.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
%h1.fr-h2= t('views.users.sessions.new.sign_in', application_name: Current.application_name)
88

99
= render partial: 'shared/france_connect_login', locals: { url: france_connect_path }
10-
= render ProConnectLoginComponent.new
10+
-# = render ProConnectLoginComponent.new
1111
1212
%p.fr-hr-or= t('views.shared.france_connect_login.separator')
1313

config/locales/views/pro_connect/en.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@ en:
33
required:
44
title: "ProConnect login required"
55
explanation: "This procedure requires ProConnect authentication. Please sign in with ProConnect to access it."
6+
index:
7+
cta: Connect with ProConnect
8+
explanation: ProConnect is the solution provided by the French government to secure and simplify connection to online services
9+
full_deploy_title: ProConnect is now fully deployed
10+
full_deploy_body: All ministries and operators can use it today
11+
you_are_a_citizen: Are you a citizen?
12+
citizen_page: Connect to your space
13+
whats_ds: '%{application_name}, the national platform for digitizing administrative procedures'
14+
pro_email: Professional email address

config/locales/views/pro_connect/fr.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@ fr:
33
required:
44
title: "Connexion ProConnect requise"
55
explanation: "Cette démarche nécessite une authentification via ProConnect. Seuls les agents disposant d’un compte ProConnect peuvent y accéder."
6+
index:
7+
cta: Se connecter avec ProConnect
8+
explanation: ProConnect est la solution proposée par l’État pour sécuriser et simplifier la connexion aux services en ligne
9+
full_deploy_title: ProConnect est désormais entièrement déployé
10+
full_deploy_body: Tous les ministères et opérateurs peuvent l’utiliser à ce jour
11+
you_are_a_citizen: Vous êtes un particulier ?
12+
citizen_page: Se connecter sur votre espace
13+
whats_ds: '%{application_name}, la plateforme nationale de dématérialisation des démarches administratives'
14+
pro_email: Adresse électronique professionnelle

config/locales/views/shared/en.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ en:
1515
france_connect_login:
1616
title: "Sign in with FranceConnect"
1717
signup_title: "Create an account with FranceConnect"
18-
signup_pc_title: "Create an account with ProConnect"
18+
# signup_pc_title: "Create an account with ProConnect"
1919
commencer_title: "Are you an individual?"
20-
commencer_pc_title: "Are you a professional?"
20+
# commencer_pc_title: "Are you a professional?"
2121
login_button: "Sign in with"
2222
help_link: What is FranceConnect?
2323
separator: or

config/locales/views/shared/fr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ fr:
1515
france_connect_login:
1616
title: "Se connecter avec FranceConnect"
1717
signup_title: "Se créer un compte avec FranceConnect"
18-
signup_pc_title: "Se créer un compte avec ProConnect"
18+
# signup_pc_title: "Se créer un compte avec ProConnect"
1919
commencer_title: "Vous êtes un particulier ?"
20-
commencer_pc_title: "Vous êtes un professionnel ?"
20+
# commencer_pc_title: "Vous êtes un professionnel ?"
2121
login_button: "S’identifier avec"
2222
help_link: "Qu’est-ce que FranceConnect ?"
2323
separator: ou

0 commit comments

Comments
 (0)