add password complexity for expert
This commit is contained in:
parent
766a5608bb
commit
71e03203aa
4 changed files with 15 additions and 20 deletions
|
@ -1,3 +0,0 @@
|
|||
.fr-messages-group{ "aria-live" => "off", id: id }
|
||||
%p.fr-message= t('views.registrations.new.password_message')
|
||||
%p.fr-message.fr-message--info= t('views.registrations.new.password_placeholder', min_length: PASSWORD_MIN_LENGTH)
|
|
@ -1,20 +1,22 @@
|
|||
.two-columns.avis-sign-up
|
||||
.columns-container
|
||||
.column.left
|
||||
%h2.fr-py-5w.text-center= @dossier.procedure.libelle
|
||||
%p.dossier Dossier nº #{@dossier.id}
|
||||
.column
|
||||
.fr-container.fr-my-5w
|
||||
.fr-grid-row.fr-grid-row--center
|
||||
.fr-col-lg-6
|
||||
= form_for(User.new(email: @email), url: sign_up_expert_avis_path(email: @email), method: :post, html: { class: "fr-py-5w" }) do |f|
|
||||
%h1.fr-h2= t('views.registrations.new.title', name: Current.application_name)
|
||||
|
||||
%h1.fr-h2
|
||||
= t('views.registrations.new.title', name: Current.application_name)
|
||||
%fieldset.fr-mb-0.fr-fieldset{ aria: { labelledby: 'create-account-legend' } }
|
||||
.fr-fieldset__element
|
||||
%p.fr-text--sm= t('utils.mandatory_champs')
|
||||
|
||||
.fr-fieldset__element= render Dsfr::InputComponent.new(form: f, attribute: :email, input_type: :email_field, opts: { disabled: true, autocomplete: 'email' })
|
||||
.fr-fieldset__element
|
||||
= render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field, opts: { autocomplete: 'new-password', minlength: PASSWORD_MIN_LENGTH }) do |c|
|
||||
- c.with_describedby do
|
||||
= render partial: "devise/password_rules", locals: { id: c.describedby_id }
|
||||
= render Dsfr::InputComponent.new(form: f, attribute: :email, input_type: :email_field, opts: { disabled: true, autocomplete: 'email' })
|
||||
|
||||
%ul.fr-btns-group
|
||||
%li= f.submit t('views.shared.account.create'), class: "fr-btn"
|
||||
.fr-fieldset__element
|
||||
= render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field,
|
||||
opts: { autofocus: 'true', autocomplete: 'new-password', data: { controller: 'turbo-input', turbo_input_url_value: show_password_complexity_path }})
|
||||
|
||||
#password_complexity
|
||||
= render PasswordComplexityComponent.new
|
||||
|
||||
= f.submit t('views.shared.account.create'), id: 'submit-password', class: "fr-btn fr-btn--lg fr-mt-2w", data: { disable_with: t('views.users.passwords.edit.submit_loading') }
|
||||
|
|
|
@ -311,8 +311,6 @@ en:
|
|||
subtitle: "Create an account using an email"
|
||||
email_label: 'Email (name@site.com)'
|
||||
password_label: "Password (%{min_length} characters minimum)"
|
||||
password_message: "Your password must have :"
|
||||
password_placeholder: "%{min_length} characters minimum"
|
||||
confirmation:
|
||||
new:
|
||||
title: 'Confirm your email address'
|
||||
|
|
|
@ -303,8 +303,6 @@ fr:
|
|||
subtitle: "Se créer un compte avec une adresse email"
|
||||
email_label: 'Email'
|
||||
password_label: "Mot de passe (%{min_length} caractères minimum)"
|
||||
password_message: "Votre mot de passe doit contenir :"
|
||||
password_placeholder: "%{min_length} caractères minimum"
|
||||
confirmation:
|
||||
new:
|
||||
title: 'Confirmez votre adresse email'
|
||||
|
|
Loading…
Reference in a new issue