Convert login form to Bootstrap

This commit is contained in:
Kumi 2019-01-16 13:26:35 +01:00
parent e62c63a103
commit 0707fb2211
2 changed files with 10 additions and 12 deletions

View file

@ -25,18 +25,16 @@
<form method="post" action="{% url 'login' %}">
{% csrf_token %}
<table>
<tr>
<td>{{ form.username.label_tag }}</td>
<td>{{ form.username }}</td>
</tr>
<tr>
<td>{{ form.password.label_tag }}</td>
<td>{{ form.password }}</td>
</tr>
</table>
<div class="form-group">
{{ form.username.label_tag }}
<input type="text" name="username" autofocus="" class="form-control" required="" id="id_username">
</div>
<div class="form-group">
{{ form.password.label_tag }}
<input type="password" name="password" class="form-control" required="" id="id_password">
</div>
<input type="submit" value="login">
<input type="submit" class="btn btn-success" value="login">
<input type="hidden" name="next" value="{{ next }}">
</form>

View file

@ -4,7 +4,7 @@ function timeSince(obj) {
interval = Math.floor(seconds / 3600);
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 ";
interval = Math.floor(seconds / 60);