summaryrefslogtreecommitdiff
path: root/yaksh/templates/registration
diff options
context:
space:
mode:
authoradityacp2019-12-20 15:34:23 +0530
committeradityacp2019-12-20 15:43:25 +0530
commitd60050dcfe7e32dc720e48942c7457860da79d6b (patch)
tree1d82d6e9c21954bbe2995a89615a19becdeb7945 /yaksh/templates/registration
parent2e4c36969b18b9ebf09314d7a04094a7debe4387 (diff)
downloadonline_test-d60050dcfe7e32dc720e48942c7457860da79d6b.tar.gz
online_test-d60050dcfe7e32dc720e48942c7457860da79d6b.tar.bz2
online_test-d60050dcfe7e32dc720e48942c7457860da79d6b.zip
Use reverse url instead of traditional url in templates
Diffstat (limited to 'yaksh/templates/registration')
-rw-r--r--yaksh/templates/registration/password_change_done.html14
-rw-r--r--yaksh/templates/registration/password_change_form.html36
-rw-r--r--yaksh/templates/registration/password_reset_complete.html17
-rw-r--r--yaksh/templates/registration/password_reset_confirm.html12
-rw-r--r--yaksh/templates/registration/password_reset_done.html9
-rw-r--r--yaksh/templates/registration/password_reset_form.html21
6 files changed, 57 insertions, 52 deletions
diff --git a/yaksh/templates/registration/password_change_done.html b/yaksh/templates/registration/password_change_done.html
index 7e075de..ccaf312 100644
--- a/yaksh/templates/registration/password_change_done.html
+++ b/yaksh/templates/registration/password_change_done.html
@@ -1,18 +1,12 @@
-{% extends "base.html" %}
+{% extends "manage.html" %}
+{% load static %}
{% block title %} Change Password {% endblock %}
-{% block nav %}
-<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top">
- <a class="navbar-brand" href="{{ URL_ROOT }}/exam/">
- <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH">
- </a>
-</nav>
-{% endblock %}
{% block script %}
<script type="text/javascript">
window.setTimeout(function()
{
- location.href="{{ URL_ROOT }}/exam/"
+ location.href="{% url 'yaksh:index' %}"
}, 2000);
</script>
{% endblock %}
@@ -25,6 +19,6 @@
<h4>Redirecting ...</h4>
</div>
</div>
-<div class="col"><img src="{{ URL_ROOT }}/static/yaksh/images/profile_change.gif/"></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 18dfa2e..4b2218f 100644
--- a/yaksh/templates/registration/password_change_form.html
+++ b/yaksh/templates/registration/password_change_form.html
@@ -1,28 +1,26 @@
-{% extends "base.html" %}
+{% extends "manage.html" %}
+
<!DOCTYPE html>
{% block pagetitle %} Change Password {% endblock %}
{% block title %} Change Password {% endblock %}
-{% block nav %}
-<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top">
- <a class="navbar-brand" href="{{ URL_ROOT }}/exam/">
- <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH">
- </a>
-</nav>
-{% endblock %}
-
{% block content %}
<br><br>
<form action="" method="post" >
- {% csrf_token %}
- <center>
- <table class=span1>
- {{ form }}
- </table>
- </center>
- <br>
- <center><button class="btn btn-success btn-lg" type="submit">Change</button>
- <button class="btn btn-primary btn-lg" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/");'>Cancel
- </button></center>
+ {% csrf_token %}
+ <center>
+ <table class="span1">
+ {{ form }}
+ </table>
+ </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 d606db9..20dc697 100644
--- a/yaksh/templates/registration/password_reset_complete.html
+++ b/yaksh/templates/registration/password_reset_complete.html
@@ -1,17 +1,22 @@
{% extends "base.html" %}
+{% 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_ROOT }}/exam/">
- <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH">
- </a>
+ <a class="navbar-brand" href="{% url 'yaksh:index' %}">
+ <img src="{% static 'yaksh/images/yaksh_banner.png' %}" alt="YAKSH">
+ </a>
</nav>
{% endblock %}
+
{% block content %}
<br><br>
+<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 110a82c..ef2d1f2 100644
--- a/yaksh/templates/registration/password_reset_confirm.html
+++ b/yaksh/templates/registration/password_reset_confirm.html
@@ -1,15 +1,17 @@
{% extends "base.html" %}
+{% 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_ROOT }}/exam/">
- <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH">
- </a>
+ <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 %}
@@ -17,7 +19,7 @@
<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 a6f30a0..036d691 100644
--- a/yaksh/templates/registration/password_reset_done.html
+++ b/yaksh/templates/registration/password_reset_done.html
@@ -1,11 +1,12 @@
{% extends "base.html" %}
+{% 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_ROOT }}/exam/">
- <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH">
- </a>
+ <a class="navbar-brand" href="{% url 'yaksh:index' %}">
+ <img src="{% static 'yaksh/images/yaksh_banner.png' %}" alt="YAKSH">
+ </a>
</nav>
{% endblock %}
@@ -17,6 +18,6 @@
Instruction for setting new password has been mailed to your registered email address
</div>
<br>
-<a class="btn btn-primary btn-lg" href="{{URL_ROOT}}/exam/login/">Go to Login</a>
+<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 fd2220f..eeca8f2 100644
--- a/yaksh/templates/registration/password_reset_form.html
+++ b/yaksh/templates/registration/password_reset_form.html
@@ -1,12 +1,13 @@
{% extends "base.html" %}
-{% block title %}
-Forgot Password
-{% endblock %}
+{% 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_ROOT }}/exam/">
- <img src="{{ URL_ROOT }}/static/yaksh/images/yaksh_banner.png" alt="YAKSH">
- </a>
+ <a class="navbar-brand" href="{% url 'yaksh:index' %}">
+ <img src="{% static 'yaksh/images/yaksh_banner.png' %}" alt="YAKSH">
+ </a>
</nav>
{% endblock %}
@@ -26,8 +27,12 @@ Forgot Password
{{ form }}
<br><br>
- <button class="btn btn-success btn-lg" type="submit">Request</button>
- <a class="btn btn-primary btn-lg" href="{{URL_ROOT}}/exam/login/">Cancel</a>
+ <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>