diff --git a/helpdesk/templates/helpdesk/checklist_form.html b/helpdesk/templates/helpdesk/checklist_form.html
index fbc9a8e7..ba45cfd9 100644
--- a/helpdesk/templates/helpdesk/checklist_form.html
+++ b/helpdesk/templates/helpdesk/checklist_form.html
@@ -45,28 +45,14 @@
+ {% trans "Position" %} |
{% trans "Description" %} |
- {% trans "Position" %} |
{% trans "Delete?" %} |
{% for form in formset %}
-
- {{ form.id }}
-
- {{ form.description }}
- {{ form.description.errors }}
- |
-
- {{ form.position }}
- {{ form.position.errors }}
- |
-
- {{ form.DELETE }}
- {{ form.DELETE.errors }}
- |
-
+ {% include 'helpdesk/include/task_form_row.html' %}
{% endfor %}
@@ -90,17 +76,28 @@
{% endblock %}
{% block helpdesk_js %}
+
+
{% endblock %}
diff --git a/helpdesk/templates/helpdesk/include/task_form_row.html b/helpdesk/templates/helpdesk/include/task_form_row.html
new file mode 100644
index 00000000..bfe9f3da
--- /dev/null
+++ b/helpdesk/templates/helpdesk/include/task_form_row.html
@@ -0,0 +1,16 @@
+
+ {{ form.id }}
+
+
+ {{ form.position }}
+ {{ form.position.errors }}
+ |
+
+ {{ form.description }}
+ {{ form.description.errors }}
+ |
+
+ {{ form.DELETE }}
+ {{ form.DELETE.errors }}
+ |
+
\ No newline at end of file
diff --git a/helpdesk/templates/helpdesk/ticket_desc_table.html b/helpdesk/templates/helpdesk/ticket_desc_table.html
index 1c3d3cfd..8cf00829 100644
--- a/helpdesk/templates/helpdesk/ticket_desc_table.html
+++ b/helpdesk/templates/helpdesk/ticket_desc_table.html
@@ -175,7 +175,7 @@
{% trans "Checklists" %} |
-
+
{% for checklist in ticket.checklists.all %}
diff --git a/helpdesk/views/staff.py b/helpdesk/views/staff.py
index e8f3f1e5..dbc471ec 100644
--- a/helpdesk/views/staff.py
+++ b/helpdesk/views/staff.py
@@ -20,7 +20,7 @@ from django.core.exceptions import PermissionDenied, ValidationError
from django.core.handlers.wsgi import WSGIRequest
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.db.models import Q
-from django.forms import inlineformset_factory, TextInput, NumberInput
+from django.forms import inlineformset_factory, TextInput, HiddenInput
from django.http import Http404, HttpResponse, HttpResponseRedirect, JsonResponse
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse, reverse_lazy
@@ -454,11 +454,11 @@ def edit_ticket_checklist(request, ticket_id, checklist_id):
formset=FormControlDeleteFormSet,
fields=['description', 'position'],
widgets={
+ 'position': HiddenInput(),
'description': TextInput(attrs={'class': 'form-control'}),
- 'position': NumberInput(attrs={'class': 'form-control'}),
},
can_delete=True,
- extra=1
+ extra=0
)
formset = TaskFormSet(request.POST or None, instance=checklist)
if form.is_valid() and formset.is_valid():
|