Commit 32716757 authored by Michal Čihař's avatar Michal Čihař

Improved layout for login page

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent d4e449e9
......@@ -3,26 +3,37 @@
{% load i18n %}
{% load translations %}
{% block breadcrumbs %}
<li><a href="{% url 'login' %}">{% trans "Login" %}</a></li>
{% endblock %}
{% block content %}
{% if form.errors %}
{% show_message "error" _("This username/password combination was not found. Please try again.") %}
{% endif %}
<h2>{% trans "Password login" %}</h2>
{% if demo_server %}
<p>{% trans "To test Weblate, you can login as <code>demo</code> user with password <code>demo</code>." %}</p>
{% show_message "info" _("To test Weblate, you can login as <code>demo</code> user with password <code>demo</code>.") %}
{% endif %}
<form method="post" action="{% url 'login' %}">
<div class="panel panel-primary">
<div class="panel-heading"><h4 class="panel-title">{% trans "Password login" %}</h4></div>
<div class="panel-body">
{% csrf_token %}
<table>
{{ form.as_table }}
</table>
<input type="submit" value="{% trans "Login" %}" class="button" />
<input type="hidden" name="next" value="{{ next }}" />
</div>
<div class="panel-footer">
<input type="submit" value="{% trans "Login" %}" class="btn btn-default" />
</div>
</div>
</form>
{% if registration_open %}
......@@ -39,11 +50,15 @@
{% if login_backends %}
<h2>{% trans "Third party login" %}</h2>
<div class="panel panel-primary">
<div class="panel-heading"><h4 class="panel-title">{% trans "Third party login" %}</h4></div>
<div class="panel-body">
{% for name in login_backends %}
<a class="button" href="{% url 'social:begin' name %}?next={{ next }}">{{ name }}</a>
<a class="btn btn-default" href="{% url 'social:begin' name %}?next={{ next }}">{{ name }}</a>
{% endfor %}
</div>
</div>
{% endif %}
......
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 to comment