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:
Ross Poulton 2009-08-04 12:04:13 +00:00
parent c7b45a8edc
commit 4d264eaa28

View File

@ -49,6 +49,10 @@ def homepage(request):
initial_data = {}
if queue:
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.fields['queue'].choices = [('', '--------')] + [[q.id, q.title] for q in Queue.objects.filter(allow_public_submission=True)]