mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-26 01:43:10 +01:00
Issue #88: Fill out "Submitter E-Mail Address" if user is logged-in and
has an e-mail address. Thanks to Andreas Kotowicz for the suggestion.
This commit is contained in:
parent
c7b45a8edc
commit
4d264eaa28
@ -49,6 +49,10 @@ def homepage(request):
|
|||||||
initial_data = {}
|
initial_data = {}
|
||||||
if queue:
|
if queue:
|
||||||
initial_data['queue'] = queue.id
|
initial_data['queue'] = queue.id
|
||||||
|
|
||||||
|
if request.user.is_authenticated() and request.user.email:
|
||||||
|
initial_data['submitter_email'] = request.user.email
|
||||||
|
|
||||||
form = PublicTicketForm(initial=initial_data)
|
form = PublicTicketForm(initial=initial_data)
|
||||||
form.fields['queue'].choices = [('', '--------')] + [[q.id, q.title] for q in Queue.objects.filter(allow_public_submission=True)]
|
form.fields['queue'].choices = [('', '--------')] + [[q.id, q.title] for q in Queue.objects.filter(allow_public_submission=True)]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user