demarches-normaliennes/app/views/users/registrations/new.html.haml
Pierre de La Morinerie a5f2c84cbf sign_up: fix suggestions error when navigating away
When navigating away from the page, the field receives the 'focusout'
event – but stops to be present in the DOM.

Thus we need to check that the DOM element is actually present.
2019-12-19 17:45:14 +01:00

27 lines
1 KiB
Text

= content_for(:page_id, 'auth')
.auth-form
= devise_error_messages!
= form_for resource, url: user_registration_path, html: { class: "form" } do |f|
%h1 Créez-vous un compte demarches-simplifiees.fr
= f.label :email, "Email"
= f.text_field :email, autofocus: true, placeholder: "Votre adresse email"
.suspect-email.hidden
.email-suggestion-title
Voulez-vous dire
%span.email-suggestion-address blabla@gmail.com
 ?
.email-suggestion-answer
= button_tag type: 'button', class: 'button small', onclick: "DS.acceptEmailSuggestion()" do
Oui
= button_tag type: 'button', class: 'button small', onclick: "DS.discardEmailSuggestionBox()" do
Non
= f.label :password, "Mot de passe"
= f.password_field :password, value: @user.password, placeholder: "8 caractères minimum"
= f.submit "Créer un compte", class: "button large primary expand"
= render partial: 'shared/france_connect_login', locals: { url: france_connect_particulier_path }