diff options
author | adityacp | 2017-04-27 15:33:47 +0530 |
---|---|---|
committer | adityacp | 2017-04-27 15:33:47 +0530 |
commit | da1d135a1834d20c0aa5d2f75ea15a0d7a9eba8a (patch) | |
tree | 59c4ea77ca5d767b3bd4a3883feff222f5fd35c4 | |
parent | 82e30d89fb1814d12a1ee40a0f1b81e164f0ed85 (diff) | |
download | online_test-da1d135a1834d20c0aa5d2f75ea15a0d7a9eba8a.tar.gz online_test-da1d135a1834d20c0aa5d2f75ea15a0d7a9eba8a.tar.bz2 online_test-da1d135a1834d20c0aa5d2f75ea15a0d7a9eba8a.zip |
Change activation_status template and add update_email url in urls.py
-rw-r--r-- | yaksh/templates/yaksh/activation_status.html | 58 | ||||
-rw-r--r-- | yaksh/urls.py | 1 |
2 files changed, 46 insertions, 13 deletions
diff --git a/yaksh/templates/yaksh/activation_status.html b/yaksh/templates/yaksh/activation_status.html index 4ffd50e..c196300 100644 --- a/yaksh/templates/yaksh/activation_status.html +++ b/yaksh/templates/yaksh/activation_status.html @@ -2,13 +2,29 @@ {% block pagetitle %} Yaksh Account Activation {% endblock %} {% block title %} Yaksh Account Activation {% endblock %} +{% block css%} + <link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/dashboard.css" type="text/css" /> +{% endblock %} +{% block nav %} +<nav class="navbar navbar-fixed-top navbar-inverse"> + <div class="container"> + <div class= "collapse navbar-collapse" id="navbar"> + <ul class="nav navbar-nav navbar-right"> + <li><a href="{{ URL_ROOT }}/exam/viewprofile"> {{ user.get_full_name.title }} </a></li> + <li><a style='cursor:pointer' id='logout' onClick='location.replace("{{URL_ROOT}}/exam/logout/");'> + <span class="glyphicon glyphicon-log-out">Logout </span></a></li> + </ul> + </div> + </div> +</nav> +{% endblock %} {% block content %} {% if success %} <center> <div class="alert alert-success" role="alert"> <strong> {{ msg }} </strong> </div> - <a href="{{URL_ROOT}}/exam/"> Click Here to Login </a> + <a href="{{URL_ROOT}}/exam/"> Home </a> </center> {% else %} {% if msg %} @@ -21,27 +37,43 @@ {% csrf_token %} <center> Enter Email Address for verification: <input type="email" name="email" required><br><br> - <button class="btn" type="submit">Resend Email</button> - <button class="btn" type="button" name="button" - onClick='location.replace("{{URL_ROOT}}/exam/");'>Cancel</button> + <button class="btn" type="submit">Send Email</button> </center> </form> {% endif %} {% endif %} <br/> -{% if new_activation_msg %} - <center> - <div class="alert alert-info" role="alert"> - <strong> {{ new_activation_msg }} </strong> - </div> - <a href="{{URL_ROOT}}/exam/"> Click Here to Login </a></center> -{% endif %} {% if activation_msg %} <center> <div class="alert alert-info" role="alert"> <strong> {{ activation_msg }} </strong> </div> - <a href="{{URL_ROOT}}/exam/"> Click Here to Login </a></center> + <a href="{{URL_ROOT}}/exam/"> Home </a> + </center> {% endif %} -{% endblock content %}
\ No newline at end of file +{% if email_err_msg %} + <center> + <div class="alert alert-warning" role="alert"> + <strong> {{ email_err_msg }} </strong> + </div> + </center> + <form action="{{ URL_ROOT }}/exam/update_email/" method="post"> + {% csrf_token %} + <center> + <table> + <tr> + <td>Enter Username:</td> + <td><input type="text" name="username" required></td> + </tr> + <tr> + <td>Enter New Email Address:</td> + <td><input type="email" name="email" required></td> + </tr> + </table> + <br> + <button class="btn" type="submit">Submit</button> + </center> + </form> +{% endif %} +{% endblock content %} diff --git a/yaksh/urls.py b/yaksh/urls.py index fae8204..20ce918 100644 --- a/yaksh/urls.py +++ b/yaksh/urls.py @@ -5,6 +5,7 @@ urlpatterns = [ url(r'^$', views.index), url(r'^login/$', views.user_login, name='login'), url(r'^logout/$', views.user_logout), + url(r'^update_email/$', views.update_email), url(r'^activate/(?P<key>.+)$', views.activate_user), url(r'^new_activation/$', views.new_activation), url(r'^quizzes/$', views.quizlist_user, name='quizlist_user'), |