summaryrefslogtreecommitdiff
path: root/tbc
diff options
context:
space:
mode:
Diffstat (limited to 'tbc')
-rwxr-xr-xtbc/templates/base.html7
-rw-r--r--tbc/templates/tbc/forgot-password.html25
-rwxr-xr-xtbc/templates/tbc/login.html29
-rw-r--r--tbc/templates/tbc/register.html2
-rw-r--r--tbc/templates/tbc/update-password.html33
-rw-r--r--tbc/urls.py4
6 files changed, 95 insertions, 5 deletions
diff --git a/tbc/templates/base.html b/tbc/templates/base.html
index 394bd15..5f19882 100755
--- a/tbc/templates/base.html
+++ b/tbc/templates/base.html
@@ -96,6 +96,7 @@
<ul class="dropdown-menu">
<li><a href="{% url 'tbc:SubmitBook' %}">Submit Book</a></li>
<li><a href="{% url 'tbc:UpdateBook' %}">Update Submission</a></li>
+ <li><a href="{% url 'tbc:UpdatePassword' %}">Update Password</a></li>
<li><a href="{% url 'tbc:UserLogout' %}">Logout</a></li>
</ul>
</li>
@@ -127,7 +128,7 @@
<center>
<div class="alert" style="width:500px;">
<a class="close" data-dismiss="alert" href="#">&times;</a>
- <p>Book has been uploaded successfully.</p>
+ <p>Book has been uploaded successfully !</p>
</div>
</center>
<div class="clearfix"></div>
@@ -136,7 +137,7 @@
<center>
<div class="alert" style="width:150px;height:23px;">
<a class="close" data-dismiss="alert" href="#">&times;</a>
- <p>Login Successful</p>
+ <p>Login Successful !</p>
</div>
</center>
<div class="clearfix"></div>
@@ -163,7 +164,7 @@
<center>
<div class="alert" style="width:650px;height:23px;">
<a class="close" data-dismiss="alert" href="#">&times;</a>
- <p>It seems that currently there is no book that you can update !! Please submit one.</p>
+ <p>It seems that currently there is no book that you can update ! Please submit one.</p>
</div>
</center>
<div class="clearfix"></div>
diff --git a/tbc/templates/tbc/forgot-password.html b/tbc/templates/tbc/forgot-password.html
new file mode 100644
index 0000000..d2cbb8d
--- /dev/null
+++ b/tbc/templates/tbc/forgot-password.html
@@ -0,0 +1,25 @@
+{% extends 'base.html' %}
+{% block content %}
+
+{% if invalid_email %}
+ <center>
+ <div class="alert" style="width:400px;height:45px;">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
+ <p>Sorry ! The email address you entered is not registered on the
+ interface it seems. Please enter a valid email address.
+ </p>
+ </div>
+ </center>
+{% endif %}
+
+<div id="content-wrap" style="max-width: 400px;">
+<br><br>
+ <center>Kindly feed in the email address you used for registration.</center>
+ <hr>
+ <form action="/forgot-password/" method=POST enctype="multipart/form-data">
+ {% csrf_token %}
+ <input type=text id="email" name="email" placeholder="Your Email">
+ <input class="btn btn-primary" type=submit value=Submit>
+ </form>
+</div>
+{% endblock %}
diff --git a/tbc/templates/tbc/login.html b/tbc/templates/tbc/login.html
index b207511..c3bbfab 100755
--- a/tbc/templates/tbc/login.html
+++ b/tbc/templates/tbc/login.html
@@ -19,18 +19,42 @@
</center>
{% endif %}
+{% if password_updated %}
+ <center>
+ <div class="alert" style="width:230px;height:23px;">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
+ <p>Password successfully updated !</p>
+ </div>
+ </center>
+{% endif %}
+
+
{% if signup %}
<center>
<div class="alert" style="width:550px;height:23px;">
<a class="close" data-dismiss="alert" href="#">&times;</a>
- <p>You have registered successfully, kindly login with your credentials !!</p>
+ <p>You have registered successfully, kindly login with your credentials !</p>
</div>
</center>
<div class="clearfix"></div>
{% endif %}
+{% if forgot_pass_redirection %}
+ <center>
+ <div class="alert" style="width:530px;height:65px;">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
+ <p>Details regarding the new credentials for your account have been
+ mailed to you successfully. Kindly check your mailbox for the
+ instructions. Do not forget to check the spam folder in case you
+ do not find the mail in your inbox.
+ </p>
+ </div>
+ </center>
+{% endif %}
+
<div id="content-wrap" style="max-width: 400px;">
-<br><br>
+<h3>Login</h3>
+<hr>
{% if require_login %}
<p>The requsted page requires login.</p>
{% endif %}
@@ -38,6 +62,7 @@
{% csrf_token %}
{{ form.as_p }}
<input class="btn btn-primary"type=submit value=Login>
+ <a href="{% url 'tbc:ForgotPassword' %}" class="btn btn-primary">Forgot Password</a>
</form>
</div>
{% endblock %}
diff --git a/tbc/templates/tbc/register.html b/tbc/templates/tbc/register.html
index c3305b8..68323fb 100644
--- a/tbc/templates/tbc/register.html
+++ b/tbc/templates/tbc/register.html
@@ -1,6 +1,8 @@
{% extends 'base.html' %}
{% block content %}
<div id="content-wrap" style="max-width:600px;">
+<h3>Registration</h3>
+<hr>
<form action="/register/" method=POST enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
diff --git a/tbc/templates/tbc/update-password.html b/tbc/templates/tbc/update-password.html
new file mode 100644
index 0000000..e2e7d0c
--- /dev/null
+++ b/tbc/templates/tbc/update-password.html
@@ -0,0 +1,33 @@
+{% extends 'base.html' %}
+{% block content %}
+
+{% if empty %}
+ <center>
+ <div class="alert" style="width:220px;height:23px;">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
+ <p>Passwords cannot be empty !</p>
+ </div>
+ </center>
+{% endif %}
+
+
+{% if no_match %}
+ <center>
+ <div class="alert" style="width:200px;height:23px;">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
+ <p>Passwords did not match !</p>
+ </div>
+ </center>
+{% endif %}
+
+
+<div id="content-wrap" style="max-width: 400px;">
+<center><h3>Update Password</h3></center>
+<hr>
+ <form action="/update-password/" method=POST enctype="multipart/form-data">
+ {% csrf_token %}
+ {{ form.as_p }}
+ <input class="btn btn-primary"type=submit value=Login>
+ </form>
+</div>
+{% endblock %}
diff --git a/tbc/urls.py b/tbc/urls.py
index 5fa1938..939be37 100644
--- a/tbc/urls.py
+++ b/tbc/urls.py
@@ -9,6 +9,10 @@ urlpatterns = patterns('',
url(r'^login/$', 'tbc.views.UserLogin', name='UserLogin'),
url(r'^logout/$', 'tbc.views.UserLogout', name='UserLogout'),
url(r'^profile/$', 'tbc.views.UserProfile', name='UserProfile'),
+ url(r'^forgot-password/$', 'tbc.views.ForgotPassword', name='ForgotPassword'),
+ url(r'^update-password/$', 'tbc.views.UpdatePassword', name='UpdatePassword'),
+
+
url(r'^submit-book/$', 'tbc.views.SubmitBook', name='SubmitBook'),
url(r'^update-book/$', 'tbc.views.UpdateBook', name='UpdateBook'),
url(r'^upload-content/(?P<book_id>\d+)$', 'tbc.views.ContentUpload', name='ContentUpload'),