Convert login form to Bootstrap
This commit is contained in:
parent
e62c63a103
commit
0707fb2211
2 changed files with 10 additions and 12 deletions
|
@ -25,18 +25,16 @@
|
||||||
|
|
||||||
<form method="post" action="{% url 'login' %}">
|
<form method="post" action="{% url 'login' %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<table>
|
<div class="form-group">
|
||||||
<tr>
|
{{ form.username.label_tag }}
|
||||||
<td>{{ form.username.label_tag }}</td>
|
<input type="text" name="username" autofocus="" class="form-control" required="" id="id_username">
|
||||||
<td>{{ form.username }}</td>
|
</div>
|
||||||
</tr>
|
<div class="form-group">
|
||||||
<tr>
|
{{ form.password.label_tag }}
|
||||||
<td>{{ form.password.label_tag }}</td>
|
<input type="password" name="password" class="form-control" required="" id="id_password">
|
||||||
<td>{{ form.password }}</td>
|
</div>
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<input type="submit" value="login">
|
<input type="submit" class="btn btn-success" value="login">
|
||||||
<input type="hidden" name="next" value="{{ next }}">
|
<input type="hidden" name="next" value="{{ next }}">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ function timeSince(obj) {
|
||||||
interval = Math.floor(seconds / 3600);
|
interval = Math.floor(seconds / 3600);
|
||||||
out = "";
|
out = "";
|
||||||
|
|
||||||
if (interval > 24) return "at " + last.toDateString().substr(4) + " " + last.toLocaleTimeString();
|
if (interval > 24) return "at " + last.toUTCString().substr(4);
|
||||||
if (interval > 1) out = interval + " hours ";
|
if (interval > 1) out = interval + " hours ";
|
||||||
|
|
||||||
interval = Math.floor(seconds / 60);
|
interval = Math.floor(seconds / 60);
|
||||||
|
|
Loading…
Reference in a new issue