Merge pull request #4971 from betagouv/autocomplete-identity

Usager : permet au navigateur web de remplir automatiquement les champs prénom, nom et mot de passes
This commit is contained in:
Pierre de La Morinerie 2020-04-02 12:15:51 +02:00 committed by GitHub
commit d7faa7aeab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -26,10 +26,10 @@
.flex
.inline-champ
= f.label :prenom, class: "required"
= f.text_field :prenom, class: "small", required: true
= f.text_field :prenom, class: "small", required: true, autocomplete: 'given-name'
.inline-champ
= f.label :nom, class: "required"
= f.text_field :nom, class: "small", required: true
= f.text_field :nom, class: "small", required: true, autocomplete: 'family-name'
- if @dossier.procedure.ask_birthday?
= f.label :birthdate, class: "required"

View file

@ -6,7 +6,7 @@
%h1 Créez-vous un compte demarches-simplifiees.fr
= f.label :email, "Email"
= f.text_field :email, autofocus: true, placeholder: "Votre adresse email"
= f.text_field :email, type: :email, autocomplete: 'username', autofocus: true, placeholder: "Votre adresse email"
.suspect-email.hidden
.email-suggestion-title
@ -20,7 +20,7 @@
Non
= f.label :password, "Mot de passe"
= f.password_field :password, value: @user.password, placeholder: "8 caractères minimum", 'aria-describedby':'8 caractères minimum'
= f.password_field :password, autocomplete: 'new-password', value: @user.password, placeholder: "8 caractères minimum", 'aria-describedby':'8 caractères minimum'
= f.submit "Créer un compte", class: "button large primary expand"

View file

@ -6,10 +6,10 @@
%h2.huge-title Connectez-vous
= f.label :email, "Email"
= f.text_field :email, autofocus: true
= f.text_field :email, type: :email, autocomplete: 'username', autofocus: true
= f.label :password, "Mot de passe"
= f.password_field :password
= f.password_field :password, autocomplete: 'current-password'
.auth-options
%div