hide "log in" button on '/helpdesk/login/' page.

modify "log in" redirect if possbible, so that user lands on same ticket (instead of dashboard) after login.
This commit is contained in:
Andreas Kotowicz
2011-11-23 19:56:36 +01:00
parent f897d5bcb4
commit 4b0b628724
2 changed files with 8 additions and 2 deletions

View File

@@ -111,10 +111,16 @@ def view_ticket(request):
return update_ticket(request, ticket_id, public=True)
# redirect user back to this ticket if possible.
redirect_url = ''
if helpdesk_settings.HELPDESK_NAVIGATION_ENABLED:
redirect_url = reverse('helpdesk_view', args=[ticket_id])
return render_to_response('helpdesk/public_view_ticket.html',
RequestContext(request, {
'ticket': ticket,
'helpdesk_settings': helpdesk_settings,
'next': redirect_url,
}))
return render_to_response('helpdesk/public_view_form.html',