Allow a file to be attached to the ticket when the ticket is opened. These files are attached to outgoing emails. Also, updated forms to loop over form.fields rather than explicitly naming each field. Fixes issue #15.

This commit is contained in:
Ross Poulton
2009-01-22 08:08:22 +00:00
parent fa79cac822
commit 11293b0b66
5 changed files with 83 additions and 57 deletions

View File

@ -402,7 +402,7 @@ ticket_list = staff_member_required(ticket_list)
def create_ticket(request):
if request.method == 'POST':
form = TicketForm(request.POST)
form = TicketForm(request.POST, request.FILES)
form.fields['queue'].choices = [('', '--------')] + [[q.id, q.title] for q in Queue.objects.all()]
form.fields['assigned_to'].choices = [('', '--------')] + [[u.id, u.username] for u in User.objects.filter(is_active=True)]
if form.is_valid():