-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c6a26c
commit 7b4a193
Showing
12 changed files
with
34 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
- attribute_name = defined?(name) ? name : :password | ||
= f.dsfr_input_group attribute_name, class: "fr-password fr-mt-2w" | ||
= f.dsfr_label_with_hint attribute_name, class: "fr-label", for: "password", hint: defined?(hint) ? hint : nil, label: defined?(password_label) ? password_label : nil | ||
/# locals: (f:, name: :password, hint: nil, password_label: nil, forgotten_password_link: false) | ||
= f.dsfr_input_group name, class: "fr-password fr-mt-2w" | ||
= f.dsfr_label_with_hint name, class: "fr-label", for: "password", hint: hint, label: password_label | ||
.fr-input-wrap | ||
= f.password_field attribute_name, autocomplete: "current-password", required: true, class: "fr-password__input fr-input" | ||
= f.dsfr_error_message attribute_name | ||
= f.password_field name, autocomplete: "current-password", required: true, class: "fr-password__input fr-input" | ||
= f.dsfr_error_message name | ||
.fr-password__checkbox.fr-checkbox-group.fr-checkbox-group--sm | ||
input type="checkbox" aria-label="Afficher le mot de passe" id="password-show" | ||
label for="password-show" class="fr-password__checkbox fr-label" Afficher | ||
- if forgotten_password_link | ||
= link_to "Mot de passe oublié ?", new_password_path(resource_name), class: "fr-link" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
/# locals: (f:, hint: nil, password_label: nil) | ||
= f.dsfr_input_group :password, class: "fr-password fr-mt-2w", data: {component: "js_dsfr_new_password"} | ||
= f.dsfr_label_with_hint :password, class: "fr-label fr-password__label", hint: defined?(hint) ? hint : nil, label: defined?(password_label) ? password_label : nil | ||
= f.dsfr_label_with_hint :password, class: "fr-label fr-password__label", hint: hint, label: password_label | ||
.fr-input-wrap | ||
= f.password_field :password, class: "fr-input fr-password__input", required: "true", autocomplete: "new-password" | ||
= f.dsfr_error_message :password | ||
.fr-password__checkbox.fr-checkbox-group.fr-checkbox-group--sm | ||
input#new-password-show[class="fr-checkbox" aria-label="Afficher le mot de passe" type="checkbox"] | ||
label.fr-password__checkbox.fr-label[for = "new-password-show"] Afficher | ||
- if defined?(live_validation) && live_validation | ||
= render "common/form/password_live_validation" | ||
= render "common/form/password_live_validation" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,22 +12,10 @@ | |
|
||
h2 Se connecter avec son compte | ||
|
||
= form_for resource, as: resource_name, url: session_path(resource_name) do |f| | ||
= form_for resource, as: resource_name, url: session_path(resource_name), builder: DsfrFormBuilder do |f| | ||
= render "devise/shared/error_messages", resource: resource | ||
.fr-input-group | ||
= f.label :email, class: "fr-label" do | ||
= "Adresse email" | ||
span.fr-hint-text Format attendu : [email protected] | ||
= f.email_field :email, autofocus: true, class: "fr-input" | ||
.fr-password | ||
= f.label :password, class: "fr-label", for: "password" | ||
.fr-input-wrap | ||
= f.password_field :password, autocomplete: "current-password", required: true, class: "fr-password__input fr-input", id: "password" | ||
.fr-password__checkbox.fr-checkbox-group.fr-checkbox-group--sm | ||
input type="checkbox" aria-label="Afficher le mot de passe" id="password-show" | ||
label for="password-show" class="fr-password__checkbox fr-label" Afficher | ||
|
||
= link_to "Mot de passe oublié ?", new_password_path(resource_name), class: "fr-link" | ||
= f.dsfr_email_field :email, autofocus: true, hint: "Format attendu : [email protected]", require: true, label: "Adresse email" | ||
= render "common/form/current_password_input", f:, forgotten_password_link: true | ||
|
||
.rdv-text-align-center | ||
= f.submit "Se connecter", class: "fr-mt-2v fr-btn" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters