Skip to content
Snippets Groups Projects
Commit c30a7996 authored by Tom Teichler's avatar Tom Teichler :beers: Committed by root
Browse files

Reformat templates

parent 4743b747
No related branches found
No related tags found
1 merge request!413Resolve "User registration"
Pipeline #10778 failed
......@@ -7,35 +7,29 @@
{% block content %}
{% if form.accounts %}
<form method="post" action="{% url 'socialaccount_connections' %}">
{% csrf_token %}
<ul class="collection with-header">
{% if form.non_field_errors %}
<div id="errorMsg">{{ form.non_field_errors }}</div>
{% endif %}
<li class="collection-header"><h4>{% blocktrans %}You can sign in to your account using any of the following third party accounts:{% endblocktrans %}</h4></li>
<div class="row">
{% for base_account in form.accounts %}
{% with base_account.get_provider_account as account %}
<li class="collection-item">
<div>
<label for="id_account_{{ base_account.id }}">
<input id="id_account_{{ base_account.id }}" type="radio" name="account" value="{{ base_account.id }}"/>
<span class="socialaccount_provider {{ base_account.provider }} {{ account.get_brand.id }}">{{account.get_brand.name}}</span>
{{ account }}
</label>
{% with base_account.get_provider_account as account %}
<div class="col s12 m6 l4 xl3">
<div class="card">
<div class="card-content">
<div class="card-title">{{ account.get_brand.name }}</div>
<p>
{{ account }}
</p>
</div>
<div class="card-action">
<a href="{% url 'socialaccount_connections' base_account.id %}">
{% trans "Remove" %}
</a>
</div>
</li>
{% endwith %}
</div>
</div>
{% endwith %}
{% endfor %}
<div>
<button type="submit" class="btn waves-effect waves-light red">
<i class="material-icons left">delete_forever</i>{% trans "Remove" %}
</button>
</div>
</fieldset>
</div>
</form>
{% else %}
......
{% extends "core/base.html" %}
{% load i18n material_form %}
{% block browser_title %}{% trans "Login cancelled" %}{% endblock %}
{% block page_title %}{% trans "Login cancelled" %}{% endblock %}
{% block content %}
<div class="container">
<div class="card red">
<div class="card-content white-text">
<div class="material-icons small left">error_outline</div>
<span class="card-title">{% blocktrans %}Login cancelled{% endblocktrans %}</span>
<p>
{% blocktrans %}
You decided to cancel logging in to our site using one of your existing accounts. If this was a mistake, please proceed to <a href="{{login_url}}">sign in</a>.
{% endblocktrans %}
</p>
</div>
</div>
</div>
{% endblock %}
......@@ -12,98 +12,106 @@
<div class="row">
<div class="col m1 l2 xl3"></div>
<div class="col s12 m10 l8 xl6">
<div class="card">
<div class="card-content">
{% if wizard.steps.current == 'auth' and socialaccount_providers %}
<div class="card-title">{% trans "Login with username and password" %}</div>
{% else %}
<div class="card-title">{% trans "Login" %}</div>
{% endif %}
{% if wizard.steps.current == "auth" and user.is_authenticated %}
<div class="alert warning">
<p>
<i class="material-icons left">warning</i>
{% blocktrans %}You have no permission to view this page. Please login with an other account.{% endblocktrans %}
</p>
</div>
{% elif wizard.steps.current == 'auth' %}
<div class="card">
<div class="card-content">
{% if wizard.steps.current == 'auth' and socialaccount_providers %}
<div class="card-title">{% trans "Login with username and password" %}</div>
{% else %}
<div class="card-title">{% trans "Login" %}</div>
{% endif %}
{% if wizard.steps.current == "auth" and user.is_authenticated %}
<div class="alert warning">
<p>
<i class="material-icons left">warning</i>
{% blocktrans %}You have no permission to view this page. Please login with an other account.{% endblocktrans %}
</p>
</div>
{% elif wizard.steps.current == 'auth' %}
<div class="alert primary">
<p>
<i class="material-icons left">info</i>
{% blocktrans %}Please login to see this page.{% endblocktrans %}
</p>
</div>
{% endif %}
{% if not wizard.steps.current == "auth" %}
<div class="alert primary">
<p>
<i class="material-icons left">info</i>
{% if wizard.steps.current == 'token' %}
{% if device.method == 'call' %}
{% blocktrans %}We are calling your phone right now, please enter the
digits you hear.{% endblocktrans %}
{% elif device.method == 'sms' %}
{% blocktrans %}We sent you a text message, please enter the tokens we
sent.{% endblocktrans %}
{% else %}
{% blocktrans %}Please enter the tokens generated by your token
generator.{% endblocktrans %}
{% endif %}
{% elif wizard.steps.current == 'backup' %}
{% blocktrans %}Use this form for entering backup tokens for logging in.
These tokens have been generated for you to print and keep safe. Please
enter one of these backup tokens to login to your account.{% endblocktrans %}
{% endif %}
</div>
{% endif %}
{% if not wizard.steps.current == "auth" %}
<div class="alert primary">
<p>
<i class="material-icons left">info</i>
{% if wizard.steps.current == 'token' %}
{% if device.method == 'call' %}
{% blocktrans %}
We are calling your phone right now, please enter the
digits you hear.
{% endblocktrans %}
{% elif device.method == 'sms' %}
{% blocktrans %}
We sent you a text message, please enter the tokens we
sent.
{% endblocktrans %}
{% else %}
{% blocktrans %}
Please enter the tokens generated by your token
generator.
{% endblocktrans %}
{% endif %}
{% elif wizard.steps.current == 'backup' %}
{% blocktrans %}
Use this form for entering backup tokens for logging in.
These tokens have been generated for you to print and keep safe. Please
enter one of these backup tokens to login to your account.
{% endblocktrans %}
{% endif %}
</p>
</div>
{% endif %}
<form action="" method="post">
{% csrf_token %}
{% include "two_factor/_wizard_forms.html" %}
<form action="" method="post">
{% csrf_token %}
{% include "two_factor/_wizard_forms.html" %}
{% if other_devices %}
<p>{% trans "Or, alternatively, use one of your backup phones:" %}</p>
<p>
{% for other in other_devices %}
<button name="challenge_device" value="{{ other.persistent_id }}" class="btn" type="submit">
{{ other|device_action }}
</button>
{% endfor %}
</p>
{% endif %}
{% if backup_tokens %}
<p>{% trans "As a last resort, you can use a backup token:" %}</p>
<p>
<button name="wizard_goto_step" type="submit" value="backup"
class="btn">{% trans "Use Backup Token" %}
{% if other_devices %}
<p>{% trans "Or, alternatively, use one of your backup phones:" %}</p>
<p>
{% for other in other_devices %}
<button name="challenge_device" value="{{ other.persistent_id }}" class="btn" type="submit">
{{ other|device_action }}
</button>
{% endfor %}
</p>
{% endif %}
{% if backup_tokens %}
<p>{% trans "As a last resort, you can use a backup token:" %}</p>
<p>
<button name="wizard_goto_step" type="submit" value="backup" class="btn">
{% trans "Use Backup Token" %}
</button>
</p>
{% endif %}
</form>
</div>
<div class="card-action-light">
<button type="submit" class="btn green waves-effect waves-light">
{% trans "Login" %}
<i class="material-icons right">send</i>
</button>
</p>
{% endif %}
<div class="card-action-light">
<button type="submit" class="btn green waves-effect waves-light">
{% trans "Login" %}
<i class="material-icons right">send</i>
</button>
{% if request.site.preferences.auth__allow_password_change %}
<a href="{% url "account_reset_password" %}" class="btn-flat right waves-effect waves-light">
{% trans "Reset password" %}
</a>
{% endif %}
{% if request.site.preferences.auth__allow_password_change %}
<a href="{% url "account_reset_password" %}" class="btn-flat right waves-effect waves-light">
{% trans "Reset password" %}
</a>
{% endif %}
</div>
</div>
</form>
</div>
<div class="card">
<div class="card-content">
{% if wizard.steps.current == 'auth' and socialaccount_providers %}
<div class="card-title">
{% trans "Use alternative login options" %}
<div class="card">
<div class="card-content">
{% if wizard.steps.current == 'auth' and socialaccount_providers %}
<div class="card-title">
{% trans "Use alternative login options" %}
</div>
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
{% endif %}
</div>
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
{% endif %}
</div>
</div>
</div>
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment