Skip to content
Snippets Groups Projects
Verified Commit 85d1368f authored by Jonathan Weth's avatar Jonathan Weth :keyboard: Committed by Tom Teichler
Browse files

Add error message on login view (permission denied)

Close #211
parent c8c3f166
No related branches found
No related tags found
1 merge request!232Resolve "Versioning of models"
...@@ -9,29 +9,38 @@ ...@@ -9,29 +9,38 @@
{% block content %} {% block content %}
<h4>{% trans "Login" %}</h4> <h4>{% trans "Login" %}</h4>
<div class="alert primary"> {% if wizard.steps.current == "auth" and user.is_authenticated %}
<p> <div class="alert warning">
<i class="material-icons left">info</i> <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>
{% else %}
<div class="alert primary">
<p>
<i class="material-icons left">info</i>
{% if wizard.steps.current == 'auth' %} {% if wizard.steps.current == 'auth' %}
{% blocktrans %}Enter your credentials.{% endblocktrans %} {% blocktrans %}Please login to see this page.{% endblocktrans %}
{% elif wizard.steps.current == 'token' %} {% elif wizard.steps.current == 'token' %}
{% if device.method == 'call' %} {% if device.method == 'call' %}
{% blocktrans %}We are calling your phone right now, please enter the {% blocktrans %}We are calling your phone right now, please enter the
digits you hear.{% endblocktrans %} digits you hear.{% endblocktrans %}
{% elif device.method == 'sms' %} {% elif device.method == 'sms' %}
{% blocktrans %}We sent you a text message, please enter the tokens we {% blocktrans %}We sent you a text message, please enter the tokens we
sent.{% endblocktrans %} sent.{% endblocktrans %}
{% else %} {% else %}
{% blocktrans %}Please enter the tokens generated by your token {% blocktrans %}Please enter the tokens generated by your token
generator.{% endblocktrans %} 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 %} {% endif %}
{% elif wizard.steps.current == 'backup' %} </div>
{% blocktrans %}Use this form for entering backup tokens for logging in. {% endif %}
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>
<form action="" method="post"> <form action="" method="post">
......
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