mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-02-02 11:29:42 +01:00
redirect user to 'helpdesk_home' from /helpdesk/login/ page, if user is already authenticated.
This commit is contained in:
parent
4b0b628724
commit
1eb0760f32
@ -2,19 +2,24 @@
|
|||||||
{% block helpdesk_title %}{% trans "Helpdesk Login" %}{% endblock %}
|
{% block helpdesk_title %}{% trans "Helpdesk Login" %}{% endblock %}
|
||||||
|
|
||||||
{% block helpdesk_body %}
|
{% block helpdesk_body %}
|
||||||
<h2>{% trans "Login" %}</h2>
|
|
||||||
|
|
||||||
<p>{% trans "To log in and begin responding to cases, simply enter your username and password below." %}</p>
|
{% if request.user.is_authenticated %}
|
||||||
|
<meta http-equiv="REFRESH" content="0;url={% url helpdesk_home %}">
|
||||||
|
{% else %}
|
||||||
|
<h2>{% trans "Login" %}</h2>
|
||||||
|
|
||||||
<form method='post' action='./'>
|
<p>{% trans "To log in and begin responding to cases, simply enter your username and password below." %}</p>
|
||||||
{% if form.errors %}<p>{% trans "Your username and password didn't match. Please try again." %}</p>{% endif %}
|
|
||||||
<dl>
|
<form method='post' action='./'>
|
||||||
<dt><label>{% trans "Username" %}</label></dt>
|
{% if form.errors %}<p>{% trans "Your username and password didn't match. Please try again." %}</p>{% endif %}
|
||||||
<dd>{{ form.username }}</dd>
|
<dl>
|
||||||
<dt><label>{% trans "Password" %}</label></dt>
|
<dt><label>{% trans "Username" %}</label></dt>
|
||||||
<dd>{{ form.password }}</dd>
|
<dd>{{ form.username }}</dd>
|
||||||
</dl>
|
<dt><label>{% trans "Password" %}</label></dt>
|
||||||
<input type='submit' value='{% trans "Login" %}' />
|
<dd>{{ form.password }}</dd>
|
||||||
<input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}../{% endif %}" />
|
</dl>
|
||||||
{% csrf_token %}</form>
|
<input type='submit' value='{% trans "Login" %}' />
|
||||||
|
<input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}../{% endif %}" />
|
||||||
|
{% csrf_token %}</form>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user