-
-
Save zilton7/f4e6b50abd4d07cff403c2b5b17b9f24 to your computer and use it in GitHub Desktop.
registration form with ToS checkbox
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
-# haml-lint:disable LineLength, Layout/SpaceInsideStringInterpolation, haml-lint:disable TrailingWhitespace | |
.container-sm.my-4.mx-auto | |
.text-center | |
%h2 Sign up | |
.row | |
.col-lg-4.mx-auto.bg-dark.rounded.shadow.p-4 | |
= simple_form_for(resource, as: resource_name, | |
url: registration_path(resource_name)) do |f| | |
= f.error_notification | |
.form-inputs | |
= f.input :email, required: true, autofocus: true, | |
input_html: { autocomplete: 'email', class: 'mb-2' } | |
= f.input :name, required: false, | |
input_html: { autocomplete: 'name', class: 'mb-2' } | |
= f.input :password, required: true, | |
hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length) | |
= f.input :password_confirmation, required: true | |
.col-lg-8.mx-auto.my-4 | |
= f.input :tos_agreement, as: :boolean, | |
label: "I agree to #{link_to 'Terms of Service', | |
terms_of_service_path, target: '_blank'}".html_safe | |
.col-lg-11.mx-auto.my-4 | |
- if flash[:recaptcha_error] | |
.bg-danger.p-2.my-3.text-center | |
= flash[:recaptcha_error] | |
= recaptcha_tags | |
.form-actions.text-center | |
= f.button :submit, 'Sign up', class: 'btn btn-success btn-lg mt-2 mb-4' | |
= render 'devise/shared/links' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment