diff --git a/helpdesk/forms.py b/helpdesk/forms.py index cc731c2a..50fa61e9 100644 --- a/helpdesk/forms.py +++ b/helpdesk/forms.py @@ -83,12 +83,6 @@ class CustomFieldMixin(object): class EditTicketForm(CustomFieldMixin, forms.ModelForm): - merged_to = forms.ModelChoiceField( - label=_('Merged to'), - help_text=_('This ticket is merged into the selected ticket.'), - queryset=Ticket.objects.all(), - disabled=True - ) class Meta: model = Ticket @@ -100,6 +94,10 @@ class EditTicketForm(CustomFieldMixin, forms.ModelForm): """ super(EditTicketForm, self).__init__(*args, **kwargs) + # Disable and add help_text to the merged_to field on this form + self.fields['merged_to'].disabled = True + self.fields['merged_to'].help_text = _('This ticket is merged into the selected ticket.') + for field in CustomField.objects.all(): try: current_value = TicketCustomFieldValue.objects.get(ticket=self.instance, field=field) diff --git a/helpdesk/templates/helpdesk/edit_ticket.html b/helpdesk/templates/helpdesk/edit_ticket.html index fbef1bfb..69df01de 100644 --- a/helpdesk/templates/helpdesk/edit_ticket.html +++ b/helpdesk/templates/helpdesk/edit_ticket.html @@ -26,6 +26,7 @@ {% trans "Note" %}: {% blocktrans %}Editing a ticket does not send an e-mail to the ticket owner or submitter. No new details should be entered, this form should only be used to fix incorrect details or clean up the submission.{% endblocktrans %}
+ {% if errors %}{% for error in errors %}{% trans "Error: " %}{{ error }}{% endfor %}{% endif %}