diff options
author | prashantsinalkar | 2020-03-05 19:28:24 +0530 |
---|---|---|
committer | prashantsinalkar | 2020-03-06 11:48:26 +0530 |
commit | fde8470c5e47434df8c854bd3135763062fada12 (patch) | |
tree | c859006456fe98e2259424c5a3826e54c17e1cbf /arduino_blog/static/admin/templates/user-register.html | |
parent | a87bea9854a2ab1248abac74c4b2f04f819297ee (diff) | |
download | arduino_projects_website-fde8470c5e47434df8c854bd3135763062fada12.tar.gz arduino_projects_website-fde8470c5e47434df8c854bd3135763062fada12.tar.bz2 arduino_projects_website-fde8470c5e47434df8c854bd3135763062fada12.zip |
fixed file structure and added forgot passowrd link
Diffstat (limited to 'arduino_blog/static/admin/templates/user-register.html')
-rw-r--r-- | arduino_blog/static/admin/templates/user-register.html | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/arduino_blog/static/admin/templates/user-register.html b/arduino_blog/static/admin/templates/user-register.html new file mode 100644 index 0000000..cfa38d9 --- /dev/null +++ b/arduino_blog/static/admin/templates/user-register.html @@ -0,0 +1,108 @@ +{% extends 'website/templates/base.html' %} +{% load widget_tweaks %} +{% load static %} +{% block title %}Register{% endblock %} +{% block cssblock %} + <link rel="stylesheet" href="{% static 'website/css/login.css' %}" type="text/css" media="screen" charset="utf-8" /> +{% endblock %} +{% block search %} +{% endblock %} +{% block content %} + +<div class="form" style="margin: 50px auto 0px;"> +<div class="headerlogin"><h2>Register</h2></div> +<div class="login"> + <br> + <p> The activation link of the account will be sent to the Email id provided.</p> + <br> + <form id="logForm" method="post" class="form-horizontal">{% csrf_token %} + <div class="form-group"> + <div class="col-xs-12"> + <div class="input-group"> + <span class="input-group-addon"><i class="fa fa-user fa-fw"></i></span> + {% render_field form.username class+="form-control username" tabindex="1" placeholder="Desired Username" %} + </div> + {{ form.username.errors }} + </div> + </div> + <div class="form-group"> + <div class="col-xs-12"> + <div class="input-group"> + <span class="input-group-addon"><i class="fa fa-envelope fa-fw"></i></span> + {% render_field form.email class+="form-control email" tabindex="1" placeholder="Your Email" %} + </div> + {{ form.email.errors }} + </div> + </div> + <div class="form-group"> + <div class="col-xs-12"> + <div class="input-group"> + <span class="input-group-addon"><i class="fa fa-lock fa-fw"></i></span> + {% render_field form.password class+="form-control password" tabindex="1" placeholder="Enter password" %} + </div> + {{ form.password.errors }} + </div> + </div> + <div class="form-group"> + <div class="col-xs-12"> + <div class="input-group"> + <span class="input-group-addon"><i class="fa fa-lock fa-fw"></i></span> + {% render_field form.password_confirm class+="form-control password_confirm" tabindex="1" placeholder="Retype Password" %} + </div> + {{ form.password_confirm.errors }} + </div> + </div> + <div class="form-group"> + <div class="col-xs-12"> + <div class="input-group captcha-group"> + <script src='https://www.google.com/recaptcha/api.js'></script> + <div class="g-recaptcha" data-sitekey="{{ SITE_KEY }}" data-callback="enableBtn"></div> + </div> + </div> + </div> + + <script> + function enableBtn(){ + document.getElementById("regstr").disabled = false; + } + </script> + <div class="col-sm-5 submitWrap"> + <button type="submit" class="btn btn-primary btn-sm " id="regstr" disabled>Register</button> + </div> + + + </div> + </br> </br> </br> + <div class="sign"> +<div class="need">Already Registered? </div> +<div> <a href="/accounts/login/" class="btn btn-sm btn-success">Login </a></div> +</div> + + </form> + </div> + </div> + </div> +{% endblock %} +{% block uncompressjsblock %} + <script> + $(function() { + // Add refresh button after field (this can be done in the template as well) + + // Click-handler for the refresh-link + $('.captcha-refresh').click(function(){ + var $form = $(this).parents('form'); + var url = location.protocol + "//" + window.location.hostname + ":"+ location.port + "/captcha/refresh/"; + + // Make the AJAX-call + $.getJSON(url, {}, function(json) { + $form.find('input[name="captcha_0"]').val(json.key); + $form.find('img.captcha').attr('src', json.image_url); + }); + + return false; + }); + }); + </script> +{% endblock %} + + |