mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
The default action when a user submit the form too quickly is to redirect to :back with flash error message. As we are using CableReady it's not working for us, so I render_alert_timestamp_error_message to show the error message to the user.
27 lines
1.1 KiB
Plaintext
27 lines
1.1 KiB
Plaintext
- signup_form_user = Spree::User.new if local_assigns[:signup_form_user].nil?
|
|
|
|
#signup-tab
|
|
= form_with model: signup_form_user, url: spree.account_path, scope: :user, data: { remote: "true" } do |form|
|
|
.row
|
|
.large-12.columns#signup-feedback
|
|
|
|
.row
|
|
.large-12.columns
|
|
= form.label :email, t(:signup_email)
|
|
= form.email_field :email, { tabindex: 1, "data-login-modal-target": "email", "data-action": "input->login-modal#emailOnInput" }
|
|
= form.error_message_on :email
|
|
.row
|
|
.large-12.columns
|
|
= form.label :password, t(:choose_password)
|
|
= form.password_field :password, { tabindex: 2, autocomplete: "off" }
|
|
= form.error_message_on :password
|
|
.row
|
|
.large-12.columns
|
|
= form.label :password_confirmation, t(:confirm_password)
|
|
= form.password_field :password_confirmation, { tabindex: 3, autocomplete: "off" }
|
|
= form.error_message_on :password_confirmation
|
|
.row
|
|
.large-12.columns
|
|
= form.submit t(:action_signup), { class: "button primary", tabindex: 4 }
|
|
= form.invisible_captcha
|