Files
growstuff/app/views/devise/registrations/new.html.haml
Daniel O'Connor 8546794311 Recaptcha (#3586)
* add recaptcha on register view

Update new.html.haml to add it

* Update Gemfile to add recaptcha

* Update env-example to show recaptcha

* More view corrections for recaptcha

* Update registrations_controller.rb to add recaptcha

* Update env-example with test config

* Recaptcha help text

* Fix trailing spaces

* Fix trailing space

* Add Recaptcha to gemfile.lock

* Fixing Gemfile.lock space

* Typo on comments in view

* Update app/views/devise/registrations/new.html.haml

* Fix signup

---------

Co-authored-by: Cesy <cesy.avon@gmail.com>
2024-01-21 15:20:03 +10:30

38 lines
1.4 KiB
Plaintext

.form-page
.card.form-card
%h1 Join #{ENV['GROWSTUFF_SITE_NAME']}
.card-body
%p Sign up for a #{ENV['GROWSTUFF_SITE_NAME']} account to track your vegetable garden and connect with other local growers.
%p If you have accessibility issues with the captcha, please contact us via the links in the footer and we will help.
= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name),
html: { class: "text-center border border-light p-5", data: { turbo: false } }) do |f|
= render 'devise/shared/error_messages', resource: resource
= f.text_field :login_name
%span This is the name that will show on the website.
= icon 'fas', 'email'
= f.email_field :email
%span We'll use this address to contact you (we never spam!)
= f.password_field :password, type: :password
= f.password_field :password_confirmation
%p
= f.check_box :tos_agreement, label: "I agree"
to the #{link_to 'Terms of Service', "/policy/tos"}
%p
= f.check_box :newsletter, checked: true, label: "Subscribe to the #{ENV['GROWSTUFF_SITE_NAME']} newsletter"
%p= render partial: 'newsletter_blurb'
= f.submit "Sign up", class: 'btn btn-block btn-success'
-# START add reCAPTCHA
= flash[:recaptcha_error]
= recaptcha_tags
-# END add reCAPTCHA
.card-footer= render "devise/shared/links"