diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/registration/login.html | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/templates/registration/login.html b/templates/registration/login.html index cee57d6..9ed5ac4 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -21,7 +21,18 @@ <div class="card-content"> <form method="post"> {% csrf_token %} - {{ form.as_p }} + <div class="row"> + <div class="input-field col s12"> + <label for="id_username">Nome utente</label> + {{ form.username }} + </div> + </div> + <div class="row"> + <div class="input-field col s12"> + <label for="id_password">Password</label> + {{ form.password }} + </div> + </div> <br> <a href={% url 'password_reset' %}>Password dimenticata</a> <br> @@ -55,6 +66,15 @@ </div> </div> {% endblock %} +{% block script %} +document.addEventListener('DOMContentLoaded', function() { + {% for field, errors in form.errors.items %} + {% for error in errors %} + M.toast({html: '{{ error }}', classes: 'orange'}) + {% endfor %} + {% endfor %} +}); +{% endblock %} {% block footer %} <footer class="page-footer {{color}}"> <div class="container"> |