Page MenuHomePhabricator
Authored By
Mnkras
Feb 19 2017, 6:06 PM
Size
9 KB
Referenced Files
None
Subscribers
None

example.diff

diff --git a/assignment_web/ui/templates/registration/login.html b/assignment_web/templates/registration/login.html
similarity index 83%
rename from assignment_web/ui/templates/registration/login.html
rename to assignment_web/templates/registration/login.html
index fbc4184..2ed1e0a 100644
--- a/assignment_web/ui/templates/registration/login.html
+++ b/assignment_web/templates/registration/login.html
@@ -1,87 +1,73 @@
{% extends "ui/header.html" %}
-{% block sidebar %}
- <h4>Classes:</h4>
- <ul class="nav nav-sidebar">
-
- {% if user.is_authenticated %}
- <li class="active"><a href="#">Overview <span class="sr-only">(current)</span></a></li>
- <li><a href="#">Reports</a></li>
- <li><a href="#">Analytics</a></li>
- <li><a href="#">Export</a></li>
- {% else %}
- <li>Please login to view your classes.</li>
- {% endif %}
- </ul>
-{% endblock %}
-{% block body %}
+{% block content %}
{% if form.errors %}
- <p class="bg-danger">Your username and password didn't match. Please try again.</p>
+ <p class="bg-danger">Your email and password didn't match. Please try again.</p>
{% endif %}
{% if next %}
{% if user.is_authenticated %}
<p>Your account doesn't have access to this page. To proceed,
please login with an account that has access.</p>
{% else %}
<p>Please login to see this page.</p>
{% endif %}
{% endif %}
<form method="post" action="{% url 'login' %}" class="form-horizontal">
{% csrf_token %}
<div class="form-group">
- <label for="username" class="col-sm-2 control-label">Username</label>
+ <label for="username" class="col-sm-2 control-label">Email</label>
<div class="col-sm-4">
<input type="text" class="form-control" name="username" id="username" autofocus>
</div>
</div>
<div class="form-group">
<label for="password" class="col-sm-2 control-label">Password</label>
<div class="col-sm-4">
<input type="password" class="form-control" name="password" id="password">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary">Sign in</button>
</div>
</div>
<input type="hidden" name="next" value="{{ next }}" />
</form>
{# Assumes you setup the password_reset view in your URLconf #}
<p><a href="{% url 'password_reset' %}">Lost password?</a></p>
{# {% if messages %}#}
{# <div class="row">#}
{# <div class="messages col-md-4 col-md-offset-2">#}
{# {% for message in messages %}#}
{# <p{% if message.tags %} class="bg-{{ message.tags }}"{% endif %}>{{ message }}</p>#}
{# {% endfor %}#}
{# </div>#}
{# </div>#}
{# {% endif %}#}
{# <div class="row">#}
{# <form action="{% url 'login' %}" method="post" class="form-horizontal">#}
{# {% csrf_token %}#}
{# <div class="form-group">#}
{# <label for="username" class="col-sm-2 control-label">Username</label>#}
{# <div class="col-sm-4">#}
{# <input type="text" class="form-control" name="username" id="username" autofocus>#}
{# </div>#}
{# </div>#}
{# <div class="form-group">#}
{# <label for="password" class="col-sm-2 control-label">Password</label>#}
{# <div class="col-sm-4">#}
{# <input type="password" class="form-control" name="password" id="password">#}
{# </div>#}
{# </div>#}
{# <div class="form-group">#}
{# <div class="col-sm-offset-2 col-sm-10">#}
{# <button type="submit" class="btn btn-primary">Sign in</button>#}
{# </div>#}
{# </div>#}
{# </form>#}
{# </div>#}
{% endblock %}
\ No newline at end of file
diff --git a/assignment_web/ui/templates/registration/password_reset_complete.html b/assignment_web/templates/registration/password_reset_complete.html
similarity index 84%
rename from assignment_web/ui/templates/registration/password_reset_complete.html
rename to assignment_web/templates/registration/password_reset_complete.html
index 3f57b66..6c54f92 100644
--- a/assignment_web/ui/templates/registration/password_reset_complete.html
+++ b/assignment_web/templates/registration/password_reset_complete.html
@@ -1,8 +1,8 @@
{% extends "ui/header.html" %}
-{% block body %}
+{% block content %}
<p>Your password has been set. You may go ahead and log in now.</p>
<p><a class="btn btn-primary" href="{{ login_url }}">Log in</a></p>
{% endblock %}
\ No newline at end of file
diff --git a/assignment_web/ui/templates/registration/password_reset_confirm.html b/assignment_web/templates/registration/password_reset_confirm.html
similarity index 95%
rename from assignment_web/ui/templates/registration/password_reset_confirm.html
rename to assignment_web/templates/registration/password_reset_confirm.html
index e788e60..0986b1f 100644
--- a/assignment_web/ui/templates/registration/password_reset_confirm.html
+++ b/assignment_web/templates/registration/password_reset_confirm.html
@@ -1,22 +1,22 @@
{% extends "ui/header.html" %}
-{% block body %}
+{% block content %}
{% 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.new_password1.errors }}
<p class="aligned wide"><label for="id_new_password1">New password:</label>{{ form.new_password1 }}</p>
{{ form.new_password2.errors }}
<p class="aligned wide"><label for="id_new_password2">Confirm password:</label>{{ form.new_password2 }}</p>
<p><input type="submit" value="Change my password" /></p>
</form>
{% else %}
<p>The password reset link was invalid, possibly because it has already been used. Please request a new password reset.</p>
{% endif %}
{% endblock %}
\ No newline at end of file
diff --git a/assignment_web/ui/templates/registration/password_reset_done.html b/assignment_web/templates/registration/password_reset_done.html
similarity index 90%
rename from assignment_web/ui/templates/registration/password_reset_done.html
rename to assignment_web/templates/registration/password_reset_done.html
index d6bd2eb..c1d15b8 100644
--- a/assignment_web/ui/templates/registration/password_reset_done.html
+++ b/assignment_web/templates/registration/password_reset_done.html
@@ -1,9 +1,9 @@
{% extends "ui/header.html" %}
-{% block body %}
+{% block content %}
<p>We've emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly.</p>
<p>If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder.</p>
{% endblock %}
\ No newline at end of file
diff --git a/assignment_web/templates/registration/password_reset_form.html b/assignment_web/templates/registration/password_reset_form.html
new file mode 100644
index 0000000..c141f3f
--- /dev/null
+++ b/assignment_web/templates/registration/password_reset_form.html
@@ -0,0 +1,12 @@
+{% extends "ui/header.html" %}
+{% block content %}
+
+ <p>Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one.</p>
+
+ <form method="post">
+ {% csrf_token %}
+ {{ form.email.errors }}
+ <p><label for="id_email">Email address:</label> {{ form.email }} <input class="btn btn-primary" type="submit" value="Reset my password" /></p>
+ </form>
+
+{% endblock %}
\ No newline at end of file
diff --git a/assignment_web/ui/templates/registration/password_reset_form.html b/assignment_web/ui/templates/registration/password_reset_form.html
deleted file mode 100644
index 13d29d7..0000000
--- a/assignment_web/ui/templates/registration/password_reset_form.html
+++ /dev/null
@@ -1,26 +0,0 @@
-{% extends "ui/header.html" %}
-{% block sidebar %}
- <h4>Classes:</h4>
- <ul class="nav nav-sidebar">
-
- {% if user.is_authenticated %}
- <li class="active"><a href="#">Overview <span class="sr-only">(current)</span></a></li>
- <li><a href="#">Reports</a></li>
- <li><a href="#">Analytics</a></li>
- <li><a href="#">Export</a></li>
- {% else %}
- <li>Please login to view your classes.</li>
- {% endif %}
- </ul>
-{% endblock %}
-{% block body %}
-
- <p>Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one.</p>
-
- <form method="post">
- {% csrf_token %}
- {{ form.email.errors }}
- <p><label for="id_email">Email address:</label> {{ form.email }} <input class="btn btn-primary" type="submit" value="Reset my password" /></p>
- </form>
-
-{% endblock %}
\ No newline at end of file

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
500243
Default Alt Text
example.diff (9 KB)

Event Timeline