Add ability for FollowUp records to be edited by staff. Closes Google Code issue #131; Github issue #5. Thanks to Google user 'alecs.box' for the patch.

This commit is contained in:
Ross Poulton
2011-01-29 06:02:03 +00:00
parent 4cb84ed4fb
commit 97886abc76
8 changed files with 147 additions and 59 deletions

View File

@ -23,6 +23,15 @@ class EditTicketForm(forms.ModelForm):
model = Ticket
exclude = ('created', 'modified', 'status', 'on_hold', 'resolution', 'last_escalation', 'assigned_to')
class EditFollowUpForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
"Filter not openned tickets here."
super(EditFollowUpForm, self).__init__(*args, **kwargs)
self.fields["ticket"].queryset = Ticket.objects.filter(status__in=(Ticket.OPEN_STATUS, Ticket.REOPENED_STATUS))
class Meta:
model = FollowUp
exclude = ('date', 'user',)
class TicketForm(forms.Form):
queue = forms.ChoiceField(
label=_('Queue'),