AgentConnect UI
This commit is contained in:
parent
ed7d776727
commit
d2432e34eb
12 changed files with 66 additions and 1 deletions
BIN
app/assets/images/logo-agent-connect.png
Normal file
BIN
app/assets/images/logo-agent-connect.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
11
app/assets/stylesheets/france-connect-agent-login.scss
Normal file
11
app/assets/stylesheets/france-connect-agent-login.scss
Normal 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;
|
||||
}
|
4
app/controllers/agent_connect/agent_controller.rb
Normal file
4
app/controllers/agent_connect/agent_controller.rb
Normal file
|
@ -0,0 +1,4 @@
|
|||
class AgentConnect::AgentController < ApplicationController
|
||||
def index
|
||||
end
|
||||
end
|
5
app/services/agent_connect_service.rb
Normal file
5
app/services/agent_connect_service.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AgentConnectService
|
||||
def self.enabled?
|
||||
ENV.fetch("AGENT_CONNECT_ENABLED", "enabled") == "enabled"
|
||||
end
|
||||
end
|
6
app/views/agent_connect/agent/index.html.haml
Normal file
6
app/views/agent_connect/agent/index.html.haml
Normal 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"
|
|
@ -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("-","‑")).html_safe
|
||||
%br
|
||||
|
|
|
@ -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=""
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -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 à l’adresse <strong>%{email}</strong>."
|
||||
|
|
11
config/locales/views/agent_connect/agent/en.yml
Normal file
11
config/locales/views/agent_connect/agent/en.yml
Normal 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
|
11
config/locales/views/agent_connect/agent/fr.yml
Normal file
11
config/locales/views/agent_connect/agent/fr.yml
Normal 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> d’utiliser 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: S’identifier avec Agent Connect
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue