AgentConnect UI

This commit is contained in:
simon lehericey 2021-11-19 10:00:04 +01:00
parent ed7d776727
commit d2432e34eb
12 changed files with 66 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -0,0 +1,11 @@
@import "colors";
@import "constants";
.france-connect-agent-login-button {
background-image: image-url("logo-agent-connect.png");
display: block;
height: 60px;
width: 230px;
margin: 20px auto;
font-size: 0;
}

View file

@ -0,0 +1,4 @@
class AgentConnect::AgentController < ApplicationController
def index
end
end

View file

@ -0,0 +1,5 @@
class AgentConnectService
def self.enabled?
ENV.fetch("AGENT_CONNECT_ENABLED", "enabled") == "enabled"
end
end

View file

@ -0,0 +1,6 @@
.container
%h1.mt-2.mb-2= t('.connect')
%p= t('.intro_html', app_name: APPLICATION_NAME)
= link_to t('.cta'), agent_connect_login_path, class: "france-connect-agent-login-button"

View file

@ -23,7 +23,13 @@
= f.submit t('views.users.sessions.new.connection'), class: "button large primary expand"
%hr
.france-connect-login-separator
= t('views.shared.france_connect_login.separator')
- if AgentConnectService.enabled?
.center
%p.mb-2= t('views.users.sessions.new.instructor_or_admin')
= link_to t('views.users.sessions.new.connect_with_agent_connect'), agent_connect_path
%hr
%p.center
%span= t('views.users.sessions.new.are_you_new', app_name: APPLICATION_NAME.gsub("-","&#8209;")).html_safe
%br

View file

@ -11,6 +11,9 @@ DS_ENV="staging"
# Utilisation de France Connect
# FRANCE_CONNECT_ENABLED="disabled" # "enabled" par défaut
# Utilisation de Agent Connect
# AGENT_CONNECT_ENABLED="disabled" # "enabled" par défaut
# Personnalisation d'instance - URLs des CGU et des mentions légales
# CGU_URL=""
# MENTIONS_LEGALES_URL=""

View file

@ -203,6 +203,8 @@ en:
connection: Sign in
are_you_new: First time on %{app_name}?
find_procedure: Find your procedure
instructor_or_admin: Instructor or Administrator ?
connect_with_agent_connect: Connect with AgentConnect
passwords:
reset_link_sent:
got_it: Got it!

View file

@ -199,6 +199,8 @@ fr:
connection: Se connecter
are_you_new: Vous êtes nouveau sur %{app_name} ?
find_procedure: Trouvez votre démarche
instructor_or_admin: Vous êtes instructeur ou administrateur ?
connect_with_agent_connect: Se connecter avec AgentConnect
passwords:
reset_link_sent:
email_sent_html: "Nous vous avons envoyé un email à ladresse <strong>%{email}</strong>."

View file

@ -0,0 +1,11 @@
en:
agent_connect:
agent:
index:
connect: Connect with AgentConnect
intro_html: |
AgentConnect allows <b class='bold'>instructors et administrators</b> to use their usual login credentials to connect to %{app_name}.
<br />
<br />
Only agents of <b class='bold'>the Ministry of Ecological Transition</b> can currently benefit from it.
cta: Connect with AgentConnect

View file

@ -0,0 +1,11 @@
fr:
agent_connect:
agent:
index:
connect: Connectez-vous avec AgentConnect
intro_html: |
AgentConnect permet aux <b class='bold'>instructeurs et administrateurs</b> dutiliser leurs identifiants habituels pour se connecter à %{app_name}.
<br />
<br />
Seul les agents du <b class='bold'>ministère de la Transition écologique</b> peuvent actuellement en bénéficier.
cta: Sidentifier avec Agent Connect

View file

@ -129,6 +129,10 @@ Rails.application.routes.draw do
post 'particulier/merge_with_new_account' => 'particulier#merge_with_new_account'
end
namespace :agent_connect do
get '' => 'agent#index'
end
namespace :champs do
get ':position/siret', to: 'siret#show', as: :siret
get ':position/dossier_link', to: 'dossier_link#show', as: :dossier_link