diff options
author | 2016-08-19 17:10:31 +0200 | |
---|---|---|
committer | 2016-08-19 17:10:31 +0200 | |
commit | 3b5ef3b0a88247eeafeee878de528aad71f9fd4b (patch) | |
tree | 8f08dcacdfd5b313f04a46406d0282cdde3670e5 /tools/pharos-dashboard/templates/registration | |
parent | e556a63cc5f78598e890346889948765906a6411 (diff) |
Split the dashboard into different apps, add tests
JIRA: RELENG-12
Signed-off-by: maxbr <maxbr@mi.fu-berlin.de>
Diffstat (limited to 'tools/pharos-dashboard/templates/registration')
-rw-r--r-- | tools/pharos-dashboard/templates/registration/login.html | 34 | ||||
-rw-r--r-- | tools/pharos-dashboard/templates/registration/registration_form.html | 30 |
2 files changed, 42 insertions, 22 deletions
diff --git a/tools/pharos-dashboard/templates/registration/login.html b/tools/pharos-dashboard/templates/registration/login.html index efdcd1fb..45b9d451 100644 --- a/tools/pharos-dashboard/templates/registration/login.html +++ b/tools/pharos-dashboard/templates/registration/login.html @@ -1,4 +1,5 @@ -{% extends "layout/base.html" %} +{% extends "layout.html" %} +{% load bootstrap3 %} {% block basecontent %} <div class="container"> @@ -17,14 +18,6 @@ {% endif %} </div> {% endif %} - {% if form.errors %} - <div class="alert alert-danger alert-dismissable"> - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - Your username and password didn't match. Please try again. - </div> - {% endif %} </div> </div> <div class="row"> @@ -36,26 +29,23 @@ </h3> </div> <div class="panel-body"> - <form method="post" action="{% url 'dashboard:login' %}"> + <form method="post"> {% csrf_token %} - <fieldset> - <div class="form-group"> - <input class="form-control" placeholder="Username" name="username" type="text" - autofocus> - </div> - <div class="form-group"> - <input class="form-control" placeholder="Password" name="password" - type="password" value=""> - </div> - <input type="submit" value="Login" class="btn btn-lg btn-success btn-block"/> - <input type="hidden" name="next" value="{{ next }}"/> - </fieldset> + {% bootstrap_form form %} + {% buttons %} + <button type="submit" class="btn btn btn-success"> + Login + </button> + <a href="{% url 'account:registration' %}" class="btn btn-info" + role="button">Register</a> + {% endbuttons %} </form> </div> </div> </div> </div> </div> + {# Assumes you setup the password_reset view in your URLconf #} {# <p><a href="{% url 'password_reset' %}">Lost password?</a></p>#} {% endblock basecontent %} diff --git a/tools/pharos-dashboard/templates/registration/registration_form.html b/tools/pharos-dashboard/templates/registration/registration_form.html new file mode 100644 index 00000000..0a921d51 --- /dev/null +++ b/tools/pharos-dashboard/templates/registration/registration_form.html @@ -0,0 +1,30 @@ +{% extends "layout.html" %} +{% load bootstrap3 %} + +{% block basecontent %} + <div class="container"> + <div class="row"> + <div class="col-md-4 col-md-offset-4"> + {% bootstrap_messages %} + <div class="login-panel panel panel-default"> + <div class="panel-heading"> + <h3 class="panel-title"> + {{ title }} + </h3> + </div> + <div class="panel-body"> + <form method="post" action=""> + {% csrf_token %} + {% bootstrap_form form %} + {% buttons %} + <button type="submit" class="btn btn btn-success"> + Submit + </button> + {% endbuttons %} + </form> + </div> + </div> + </div> + </div> + </div> +{% endblock basecontent %} |