From 1eb0760f3267e806ccb81953c9ea7625257cc976 Mon Sep 17 00:00:00 2001 From: Andreas Kotowicz Date: Wed, 23 Nov 2011 19:57:11 +0100 Subject: [PATCH] redirect user to 'helpdesk_home' from /helpdesk/login/ page, if user is already authenticated. --- .../helpdesk/registration/login.html | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/helpdesk/templates/helpdesk/registration/login.html b/helpdesk/templates/helpdesk/registration/login.html index 0dba9ad42..b97a82494 100644 --- a/helpdesk/templates/helpdesk/registration/login.html +++ b/helpdesk/templates/helpdesk/registration/login.html @@ -2,19 +2,24 @@ {% block helpdesk_title %}{% trans "Helpdesk Login" %}{% endblock %} {% block helpdesk_body %} -

{% trans "Login" %}

-

{% trans "To log in and begin responding to cases, simply enter your username and password below." %}

+{% if request.user.is_authenticated %} + +{% else %} +

{% trans "Login" %}

-
- {% if form.errors %}

{% trans "Your username and password didn't match. Please try again." %}

{% endif %} -
-
-
{{ form.username }}
-
-
{{ form.password }}
-
- - -{% csrf_token %}
+

{% trans "To log in and begin responding to cases, simply enter your username and password below." %}

+ +
+ {% if form.errors %}

{% trans "Your username and password didn't match. Please try again." %}

{% endif %} +
+
+
{{ form.username }}
+
+
{{ form.password }}
+
+ + + {% csrf_token %}
+{% endif %} {% endblock %}