Changeset View
Changeset View
Standalone View
Standalone View
bid_main/templates/bid_main/register.html
- This file was added.
| {% extends 'layout.html' %} | |||||
| {% load trans from i18n %} | |||||
| {% load static %} | |||||
| {% load add_form_classes from forms %} | |||||
| {% block page_title %} | |||||
| Register your Blender ID | |||||
| {% endblock %} | |||||
| {% block body %} | |||||
| <div class="bid box"> | |||||
| <div class="row"> | |||||
| <div class="col-md-8 mx-auto"> | |||||
| <div class="bid-header"> | |||||
| <h1>Get Your Own Blender ID</h1> | |||||
| </div> | |||||
| {% with form=form|add_form_classes %} | |||||
| <form id="form-register" role="register" action="" method="POST" name="register_user_form">{% csrf_token %} | |||||
| <fieldset> | |||||
| <!-- Full name input--> | |||||
| {% with field=form.full_name %} | |||||
| {% include "components/field_label_wrapped.html" %} | |||||
| {% endwith %} | |||||
| <!-- Email input--> | |||||
| {% with field=form.email %} | |||||
| {% include "components/field_label_wrapped.html" %} | |||||
| {% endwith %} | |||||
| <!-- Password --> | |||||
| {% with field=form.password %} | |||||
| {% include "components/field_label_wrapped.html" %} | |||||
| {% endwith %} | |||||
| <!-- Confirm password input--> | |||||
| {% with field=form.password_confirm %} | |||||
| {% include "components/field_label_wrapped.html" %} | |||||
| {% endwith %} | |||||
| <!-- hidden reCAPTCHA input --> | |||||
| {{ form.recaptcha_token }} | |||||
| {{ form.recaptcha_token.errors }} | |||||
| <!-- Privacy Policy checkbox--> | |||||
| <div class="form-group form-check">{{ form.agree_privacy_policy }} | |||||
| <label style="display: inline" for="{{ form.agree_privacy_policy.id_for_label }}"></label>I have read and agree to the <a href="/privacy-policy" target="_blank">Privacy Policy</a>. | |||||
| </div>{{ form.agree_privacy_policy.errors }} | |||||
| {{ form.non_field_errors }} | |||||
| </fieldset> | |||||
| <div class="bid-cta"> | |||||
| <button class="btn btn-success" id="register"><i class="icon"> | |||||
| <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 512 512"> | |||||
| <path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"></path> | |||||
| </svg></i>Create Account</button> | |||||
| </div> | |||||
| <hr/> | |||||
| <div class="bid-links"><a href="{% url 'bid_main:login' %}">Already have an account?</a></div> | |||||
| </form> | |||||
| {% endwith %} | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| {% endblock body %} | |||||
| {% block footer_scripts %}{{ block.super }} | |||||
| {% if settings.GOOGLE_RECAPTCHA_SITE_KEY %} | |||||
| <script src="https://www.google.com/recaptcha/api.js?render={{ settings.GOOGLE_RECAPTCHA_SITE_KEY }}" async="async" defer="defer"></script> | |||||
| <script> | |||||
| const form = document.getElementById("form-register"); | |||||
| form.addEventListener('submit', (e) => { | |||||
| e.preventDefault(); | |||||
| grecaptcha.ready(function() { | |||||
| grecaptcha.execute('{{ settings.GOOGLE_RECAPTCHA_SITE_KEY }}', {action: 'submit'}).then( | |||||
| function(token) { | |||||
| const recaptchaTokenInput = document.getElementById("id_recaptcha_token"); | |||||
| recaptchaTokenInput.value = token; | |||||
| form.submit(); | |||||
| }); | |||||
| }); | |||||
| }); | |||||
| </script> | |||||
| {% endif %} | |||||
| {% endblock footer_scripts %} | |||||