diff options
author | Palaparthy Adityachandra | 2020-02-28 13:43:48 +0530 |
---|---|---|
committer | GitHub | 2020-02-28 13:43:48 +0530 |
commit | ce0cdc307312d4da803abb3377cf7562b3fbcb4b (patch) | |
tree | b1303ee3214c0e1ff0581d9ce96495c7efde6cd7 /yaksh/templates/registration | |
parent | 32f1d4dc7816bbb93f6dda77591eeb75c3f30c0d (diff) | |
parent | b4751e0c1783a71c6672554114ccdf5a78c6b47f (diff) | |
download | online_test-ce0cdc307312d4da803abb3377cf7562b3fbcb4b.tar.gz online_test-ce0cdc307312d4da803abb3377cf7562b3fbcb4b.tar.bz2 online_test-ce0cdc307312d4da803abb3377cf7562b3fbcb4b.zip |
Merge pull request #652 from adityacp/revamp_ui
Revamp UI in moderator and student dashboard
Diffstat (limited to 'yaksh/templates/registration')
6 files changed, 192 insertions, 69 deletions
diff --git a/yaksh/templates/registration/password_change_done.html b/yaksh/templates/registration/password_change_done.html index bac19fa..34045d4 100644 --- a/yaksh/templates/registration/password_change_done.html +++ b/yaksh/templates/registration/password_change_done.html @@ -1,27 +1,31 @@ {% extends "base.html" %} +{% load static %} {% block pagetitle %} -<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> - <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > - <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> - </img> - </a> -</div> +<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top"> + <a class="navbar-brand" href="{% url 'yaksh:index' %}"> + <img src="{% static 'yaksh/images/yaksh_banner.png' %}" alt="YAKSH"> + </a> +</nav> {% endblock %} +{% block title %} Change Password {% endblock %} + {% block script %} <script type="text/javascript"> - window.setTimeout(function() - { - location.href="{{ URL_ROOT }}/exam/" - }, 2000); + window.setTimeout(function() + { + location.href="{% url 'yaksh:index' %}" + }, 2000); </script> {% endblock %} {% block content %} -<div class="row align-items-center"> - <div class="col"> - <h3>Your password has been changed successfully.</h3> - <h4>Redirecting ...</h4> - </div> - - <div class="col"><img src="{{ URL_ROOT }}/static/yaksh/images/profile_change.gif/"></div> -</div> +<br><br> +<center> + <div class="container row align-items-center"> + <div class="col"> + <h3>Your password has been changed successfully.</h3> + <h4>Redirecting ...</h4> + </div> + </div> +<div class="col"><img src="{% static 'yaksh/images/profile_change.gif' %}"></div> +</center> {% endblock %} diff --git a/yaksh/templates/registration/password_change_form.html b/yaksh/templates/registration/password_change_form.html index b618410..8d8424e 100644 --- a/yaksh/templates/registration/password_change_form.html +++ b/yaksh/templates/registration/password_change_form.html @@ -1,16 +1,99 @@ {% extends "base.html" %} +{% load static %} + <!DOCTYPE html> -{% block pagetitle %} Change Password {% endblock %} +{% block nav %} +<div class="container-fluid"> + <nav class="navbar navbar-expand-sm navbar-dark bg-primary fixed-top"> + <a class="navbar-brand" href="{% url 'yaksh:index' %}"> + <img src="{% static 'yaksh/images/yaksh_banner.png' %}" alt="YAKSH"> + </a> + <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse" id="navbarColor01"> + <ul class="navbar-nav ml-auto"> + <li class="nav-item dropdown my-lg-0" style="font-size: 1.2rem"> + <a class="dropdown-toggle nav-link" id="user_dropdown" data-toggle="dropdown" href="#">{{user.get_full_name|title}} + </a> + <div class="dropdown-menu dropdown-menu-right"> + <a class="dropdown-item" href="{% url 'yaksh:edit_profile' %}"> + <i class="fa fa-user"></i> My Profile + </a> + <div class="dropdown-divider"></div> + <a class="dropdown-item" href="{% url 'password_change' %}"> + <i class="fa fa-key"></i> Change Password + </a> + <div class="dropdown-divider"></div> + <a class="dropdown-item" id="user_logout" href="{% url 'yaksh:logout' %}"> + <i class="fa fa-sign-out"></i> Logout + </a> + </div> + </li> + </ul> + </div> + </nav> +</div> +{% endblock %} +{% block pagetitle %} +Change Password +{% endblock %} +{% block title %} Change Password {% endblock %} +{% block script %} +<script type="text/javascript"> + $(document).ready(function() + { + $("#id_old_password").addClass("form-control"); + $("#id_new_password1").addClass("form-control"); + $("#id_new_password2").addClass("form-control"); + }); +</script> +{% endblock %} {% block content %} <form action="" method="post" > - {% csrf_token %} - <center> - <table class=span1> - {{ form }} - </table> - </center> - <center><button class="btn" type="submit">Change Password</button> - <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/");'>Cancel</button></center> + {% csrf_token %} + <center> + <div class="container col-md-6"> + <table class="table table-responsive-sm"> + {% if form.errors %} + {% for field in form %} + {% for error in field.errors %} + <div class="alert alert-dismissible alert-danger"> + <button type="button" class="close" data-dismiss="alert"> + <i class="fa fa-close"></i> + </button> + <strong>{{ error|escape }}</strong> + </div> + {% endfor %} + {% endfor %} + {% for error in qform.non_field_errors %} + <div class="alert alert-dismissible alert-danger"> + <button type="button" class="close" data-dismiss="alert"> + <i class="fa fa-close"></i> + </button> + <strong>{{ error|escape }}</strong> + </div> + {% endfor %} + {% endif %} + {% for field in form %} + <tr> + <td>{{ field.label }}</td> + <td>{{ field }} <small>{{ field.help_text }}</small></td> + </tr> + {% endfor %} + </table> + </div> + </center> + <br> + <center> + <button class="btn btn-success btn-lg" type="submit"> + Change + </button> + <a href="{% url 'yaksh:index' %}" class="btn btn-primary btn-lg"> + Cancel + </a> + </center> </form> {% endblock content %} diff --git a/yaksh/templates/registration/password_reset_complete.html b/yaksh/templates/registration/password_reset_complete.html index bc9245f..ddf94a6 100644 --- a/yaksh/templates/registration/password_reset_complete.html +++ b/yaksh/templates/registration/password_reset_complete.html @@ -1,15 +1,21 @@ {% extends "base.html" %} -{% block pagetitle %} -<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> - <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > - <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> - </img> - </a> -</div> +{% load static %} + +{% block title %} Forgot Password {% endblock %} + +{% block nav %} +<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top"> + <a class="navbar-brand" href="{% url 'yaksh:index' %}"> + <img src="{% static 'yaksh/images/yaksh_banner.png' %}" alt="YAKSH"> + </a> +</nav> {% endblock %} + {% block content %} +<center> <div class="container"> -<p>Your password has been reset. </p> -<p><a href="{{ login_url }}" class="btn btn-success">Log in</a></p> -</div> + <p>Your password has been reset. </p> + <p><a href="{{ login_url }}" class="btn btn-success btn-lg">Log in</a></p> + </div> +</center> {% endblock %} diff --git a/yaksh/templates/registration/password_reset_confirm.html b/yaksh/templates/registration/password_reset_confirm.html index 49563ac..ef2d1f2 100644 --- a/yaksh/templates/registration/password_reset_confirm.html +++ b/yaksh/templates/registration/password_reset_confirm.html @@ -1,21 +1,25 @@ {% extends "base.html" %} -{% block pagetitle %} -<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> - <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > - <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> - </img> - </a> -</div> +{% load static %} + +{% block title %} Forgot Password {% endblock %} + +{% block nav %} +<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top"> + <a class="navbar-brand" href="{% url 'yaksh:index' %}"> + <img src="{% static 'yaksh/images/yaksh_banner.png' %}" alt="YAKSH"> + </a> +</nav> {% endblock %} -{% block content %} +{% block content %} +<br><br> <center><h4>Reset Password</h4> {% if validlink %} <p>Please enter your new password twice so we can verify you typed it in correctly</p>. <form method="post"> {% csrf_token %} {{ form.as_p }} - <button class= "btn btn-success" type="submit">Submit</button> + <button class= "btn btn-success btn-lg" type="submit">Submit</button> </form> {% else %} <p>This reset link is no longer valid!</p> diff --git a/yaksh/templates/registration/password_reset_done.html b/yaksh/templates/registration/password_reset_done.html index 8f259c7..94138dd 100644 --- a/yaksh/templates/registration/password_reset_done.html +++ b/yaksh/templates/registration/password_reset_done.html @@ -1,18 +1,22 @@ {% extends "base.html" %} -{% block pagetitle %} -<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> - <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > - <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> - </img> - </a> -</div> +{% load static %} +{% block title %} Forgot Password {% endblock %} + +{% block nav %} +<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top"> + <a class="navbar-brand" href="{% url 'yaksh:index' %}"> + <img src="{% static 'yaksh/images/yaksh_banner.png' %}" alt="YAKSH"> + </a> +</nav> {% endblock %} {% block content %} <center> -<h4>Password reset successful</h4> -<div class="alert alert-success animated flash col-md-8"> +<h2>Password reset successful</h2> +<div class="alert alert-success col-md-8"> Instruction for setting new password has been mailed to your registered email address </div> +<br> +<a class="btn btn-primary btn-lg" href="{% url 'yaksh:login' %}">Go to Login</a> </center> {% endblock %} diff --git a/yaksh/templates/registration/password_reset_form.html b/yaksh/templates/registration/password_reset_form.html index de05df9..acee288 100644 --- a/yaksh/templates/registration/password_reset_form.html +++ b/yaksh/templates/registration/password_reset_form.html @@ -1,21 +1,43 @@ {% extends "base.html" %} -{% block pagetitle %} -<div class="yakshnav fixed-top" style=" padding-top: 0.5%;padding-bottom: 0.5%;"> - <a class="navbar-brand" href="{{ URL_ROOT }}/exam/" > - <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH"> - </img> - </a> -</div> +{% load static %} + +{% block title %} Forgot Password {% endblock %} + +{% block nav %} +<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top"> + <a class="navbar-brand" href="{% url 'yaksh:index' %}"> + <img src="{% static 'yaksh/images/yaksh_banner.png' %}" alt="YAKSH"> + </a> +</nav> {% endblock %} {% block content %} <center> -<h4>Email will be send to the registered email address</h4> -<form action="" method="post"> - {% csrf_token %} - {{ form }} - <button class="btn btn-success" type="submit">Request</button> - <a class="btn btn-danger" href="{{URL_ROOT}}/exam/login/">Cancel</a> -</form> +<h4>Enter your registered email address to reset your password</h4> +<div class="container"> + <div class="row justify-content-center"> + <div class="col-md-6 col-md-offset-6"> + <div class="card border-primary"> + <div class="card-header"><h3>Forgot Password?</h3></div> + <div class="card-body"> + <div class="form-group"> + <form action="" method="post"> + {% csrf_token %} + + {{ form }} + <br><br> + <button class="btn btn-success btn-lg" type="submit"> + Request + </button> + <a href="{% url 'yaksh:index' %}" class="btn btn-primary btn-lg"> + Cancel + </a> + </form> + </div> + </div> + </div> + </div> + </div> +</div> </center> {% endblock content %} |