Commit 2b450c1f by Bach Dániel

Merge branch 'login-fix' into 'master'

Login Fix

Closes #276
parents a09339a2 1c9517e6
...@@ -11,10 +11,6 @@ ...@@ -11,10 +11,6 @@
body { body {
margin-top: 40px; margin-top: 40px;
} }
.container {
width: 600px;
}
ul, li { ul, li {
list-style: none; list-style: none;
margin: 0; margin: 0;
...@@ -22,6 +18,8 @@ ...@@ -22,6 +18,8 @@
} }
.container > .content { .container > .content {
max-width: 570px;
margin: auto;
background-color: #fff; background-color: #fff;
padding: 20px; padding: 20px;
-webkit-border-radius: 10px 10px 10px 10px; -webkit-border-radius: 10px 10px 10px 10px;
...@@ -38,8 +36,10 @@ ...@@ -38,8 +36,10 @@
} }
.login-form { .login-form {
margin-top: 40px; margin: 20px auto 0 auto;
padding: 0 10px; padding: 0 10px;
max-width: 250px;
} }
.login-form form { .login-form form {
...@@ -79,3 +79,10 @@ ...@@ -79,3 +79,10 @@
<img src="{{ STATIC_URL}}dashboard/img/logo.png" style="height: 25px;"/> <img src="{{ STATIC_URL}}dashboard/img/logo.png" style="height: 25px;"/>
</a> </a>
{% endblock %} {% endblock %}
{% block content %}
<div class="content">
{% block content_box %}{% endblock %}
</div>
{% endblock %}
...@@ -11,15 +11,14 @@ ...@@ -11,15 +11,14 @@
</a> </a>
{% endblock %} {% endblock %}
{% block content %} {% block content_box %}
<div class="content">
<div class="row"> <div class="row">
{% if form.password.errors or form.username.errors %} {% if form.password.errors or form.username.errors %}
<div class="login-form-errors"> <div class="login-form-errors">
{% include "display-form-errors.html" %} {% include "display-form-errors.html" %}
</div> </div>
{% endif %} {% endif %}
<div class="col-sm-{% if saml2 %}6{% else %}12{% endif %}"> <div class="col-xs-{% if saml2 %}6{% else %}12{% endif %}">
<div class="login-form"> <div class="login-form">
<form action="" method="POST"> <form action="" method="POST">
{% csrf_token %} {% csrf_token %}
...@@ -28,8 +27,8 @@ ...@@ -28,8 +27,8 @@
</div> </div>
</div> </div>
{% if saml2 %} {% if saml2 %}
<div class="col-sm-6"> <div class="col-xs-6">
<h4 style="padding-top: 0; margin-top: 0;">{% trans "Login with SSO" %}</h4> <h4 style="padding-top: 0; margin-top: 20px;">{% trans "Login with SSO" %}</h4>
<a href="{% url "saml2_login" %}">{% trans "Click here!" %}</a> <a href="{% url "saml2_login" %}">{% trans "Click here!" %}</a>
</div> </div>
{% endif %} {% endif %}
......
...@@ -5,9 +5,8 @@ ...@@ -5,9 +5,8 @@
{% block title-page %}{% trans "Password reset complete" %}{% endblock %} {% block title-page %}{% trans "Password reset complete" %}{% endblock %}
{% block content %} {% block content_box %}
<div class="content"> <div class="row">
<div class="row">
<div class="login-form-errors"> <div class="login-form-errors">
{% include "display-form-errors.html" %} {% include "display-form-errors.html" %}
</div> </div>
...@@ -17,6 +16,5 @@ ...@@ -17,6 +16,5 @@
<a href="{% url "accounts.login" %}">{% trans "Click here to login" %}</a> <a href="{% url "accounts.login" %}">{% trans "Click here to login" %}</a>
</div> </div>
</div> </div>
</div>
</div> </div>
{% endblock %} {% endblock %}
...@@ -5,15 +5,16 @@ ...@@ -5,15 +5,16 @@
{% block title-page %}{% trans "Password reset confirm" %}{% endblock %} {% block title-page %}{% trans "Password reset confirm" %}{% endblock %}
{% block content %} {% block content_box %}
<div> <div class="row">
<div class="row">
<div class="login-form-errors"> <div class="login-form-errors">
{% include "display-form-errors.html" %} {% include "display-form-errors.html" %}
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
<div style="margin: 0 0 25px 0;"> <div>
{% blocktrans %}Please enter your new password twice so we can verify you typed it in correctly!{% endblocktrans %} {% blocktrans %}
Please enter your new password twice so we can verify you typed it in correctly.
{% endblocktrans %}
</div> </div>
{% if form %} {% if form %}
...@@ -21,10 +22,9 @@ ...@@ -21,10 +22,9 @@
{% else %} {% else %}
<div class="alert alert-warning"> <div class="alert alert-warning">
{% url "accounts.password-reset" as url %} {% url "accounts.password-reset" as url %}
{% blocktrans with url=url %}This token is expired, please <a href="{{ url }}">request</a> a new password reset link again!{% endblocktrans %} {% blocktrans with url=url %}This token is expired, please <a href="{{ url }}">request</a> a new password reset link again.{% endblocktrans %}
</div> </div>
{% endif %} {% endif %}
</div> </div>
</div>
</div> </div>
{% endblock %} {% endblock %}
...@@ -5,16 +5,14 @@ ...@@ -5,16 +5,14 @@
{% block title-page %}{% trans "Password reset done" %}{% endblock %} {% block title-page %}{% trans "Password reset done" %}{% endblock %}
{% block content %} {% block content_box %}
<div class="content"> <div class="row">
<div class="row">
<div class="login-form-errors"> <div class="login-form-errors">
{% include "display-form-errors.html" %} {% include "display-form-errors.html" %}
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
<div class="pull-right"><a href="{% url "accounts.login" %}">{% trans "Back to login" %}</a></div> <div class="pull-right"><a href="{% url "accounts.login" %}">{% trans "Back to login" %}</a></div>
{% trans "We have sent you an email about your next steps!" %} {% trans "We have sent you an email about your next steps." %}
</div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
...@@ -5,20 +5,20 @@ ...@@ -5,20 +5,20 @@
{% block title-page %}{% trans "Password reset" %}{% endblock %} {% block title-page %}{% trans "Password reset" %}{% endblock %}
{% block content %} {% block content_box %}
<div class="content"> <div class="row">
<div class="row">
<div class="login-form-errors"> <div class="login-form-errors">
{% include "display-form-errors.html" %} {% include "display-form-errors.html" %}
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
<div class="pull-right"><a href="{% url "accounts.login" %}">{% trans "Back to login" %}</a></div> <div class="pull-right"><a href="{% url "accounts.login" %}">{% trans "Back to login" %}</a></div>
<h4 style="margin: 0 0 25px 0;">{% blocktrans %}Enter your email address to reset your password!{% endblocktrans %}</h4> <h4 style="margin: 0 0 25px 0;">
{% blocktrans %}Enter your email address to reset your password.{% endblocktrans %}
</h4>
<form action="" method="POST"> <form action="" method="POST">
{% csrf_token %} {% csrf_token %}
{% crispy form %} {% crispy form %}
</form> </form>
</div> </div>
</div>
</div> </div>
{% endblock %} {% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment