misc: add "remember me" option in login form (#26233)

This commit is contained in:
Serghei Mihai 2018-09-24 10:16:04 +02:00
parent e478fc9d42
commit c26aa8f81f
2 changed files with 26 additions and 1 deletions

View File

@ -396,6 +396,20 @@ div#main-content {
margin: 0 auto;
}
div#login-page {
span.helptext {
display: none;
}
label[for=id_remember_me] {
float: left;
}
#id_remember_me {
margin: 0 auto;
width: 1em;
float: left;
margin: 0.4ex 1ex;
}
}
div#login-page, div#registration {
font-weight: normal;
width: 100%;

View File

@ -3,7 +3,18 @@
<div>
<form method="post" action="">
{% csrf_token %}
{{ form.as_p }}
<p>
<label for="id_username">Courriel&nbsp;:</label>
<input id="id_username" maxlength="254" name="username" type="text">
</p>
<p>
<label for="id_password">Mot de passe&nbsp;:</label>
<input id="id_password" name="password" type="password">
</p>
<p>
<input id="id_remember_me" name="remember_me" type="checkbox">
<label for="id_remember_me">Rester connecté</label>
</p>
<input type="submit" name="{{ submit_name }}" value="{% trans "Log in" %}"/>
{% if cancel %}
<input type="submit" name="cancel" value="{% trans 'Cancel' %}"/>