forked from extern/django-helpdesk
adding due_date form and model field
This commit is contained in:
parent
0f38b688a1
commit
01b0adc733
@ -153,6 +153,17 @@ class TicketForm(forms.Form):
|
||||
'as \'3\'.'),
|
||||
)
|
||||
|
||||
due_date = forms.DateTimeField(
|
||||
widget=extras.SelectDateWidget,
|
||||
required=False,
|
||||
label=_('Due on'),
|
||||
)
|
||||
|
||||
def clean_due_date:
|
||||
new_data = self.cleaned_data['due_date']
|
||||
if new_data != self.instance.due_date:
|
||||
print "you changed!"
|
||||
|
||||
attachment = forms.FileField(
|
||||
required=False,
|
||||
label=_('Attach File'),
|
||||
@ -235,6 +246,7 @@ class TicketForm(forms.Form):
|
||||
queue = q,
|
||||
description = self.cleaned_data['body'],
|
||||
priority = self.cleaned_data['priority'],
|
||||
due_date = self.cleaned_data['due_date'],
|
||||
)
|
||||
|
||||
if HAS_TAG_SUPPORT:
|
||||
@ -377,6 +389,12 @@ class PublicTicketForm(forms.Form):
|
||||
help_text=_('Please select a priority carefully.'),
|
||||
)
|
||||
|
||||
due_date = forms.DateTimeField(
|
||||
widget=extras.SelectDateWidget,
|
||||
required=False,
|
||||
label=_('Due on'),
|
||||
)
|
||||
|
||||
attachment = forms.FileField(
|
||||
required=False,
|
||||
label=_('Attach File'),
|
||||
@ -447,6 +465,7 @@ class PublicTicketForm(forms.Form):
|
||||
queue = q,
|
||||
description = self.cleaned_data['body'],
|
||||
priority = self.cleaned_data['priority'],
|
||||
due_date = self.cleaned_data['due_date'],
|
||||
)
|
||||
|
||||
t.save()
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -326,6 +326,12 @@ class Ticket(models.Model):
|
||||
help_text=_('1 = Highest Priority, 5 = Low Priority'),
|
||||
)
|
||||
|
||||
due_date = models.DateTimeField(
|
||||
_('Due on'),
|
||||
blank=True,
|
||||
null=True,
|
||||
)
|
||||
|
||||
last_escalation = models.DateTimeField(
|
||||
blank=True,
|
||||
null=True,
|
||||
|
Loading…
Reference in New Issue
Block a user