Removed ticket new status logic from templates

This commit is contained in:
Sam Splunks 2024-02-05 11:34:56 +01:00 committed by GitHub
parent 8b53ef9505
commit c7a9a1ab54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 27 deletions

View File

@ -110,18 +110,8 @@
<input type="hidden" name="new_status" value="{{ ticket.status }}" />
{% else %}
<dd><div class="form-group">
{% for status_choice in ticket.STATUS_CHOICES %}
{% with status_choice_strfmt_s=status_choice.0|stringformat:"s" %}
{% if ticket.status == 2 and status_choice_strfmt_s in "1" %}{% else %}
{% if ticket.status == 3 and status_choice_strfmt_s not in "2,3,4" %}{% else %}
{% if ticket.status == 4 and status_choice_strfmt_s not in "2,4" %}{% else %}
{% if ticket.status == 5 and status_choice_strfmt_s not in "2,5" %}{% else %}
<label for='st_{{ status_choice.1|lower }}' class='{% if ticket.status == status_choice.0 %}active {% endif %}radio-inline'><input type='radio' name='new_status' value='{{ status_choice.0 }}' id='st_{{ status_choice.1|lower }}'{% if not ticket.can_be_resolved %} disabled='disabled'{% endif %}{% if ticket.status == status_choice.0 %} checked='checked'{% endif %}>{{ status_choice.1 }} &raquo;</label>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endwith %}
{% for status_choice in ticket.get_allowed_status_flow %}
<label for='st_{{ status_choice.1|lower }}' class='{% if ticket.status == status_choice.0 %}active {% endif %}radio-inline'><input type='radio' name='new_status' value='{{ status_choice.0 }}' id='st_{{ status_choice.1|lower }}'{% if not ticket.can_be_resolved %} disabled='disabled'{% endif %}{% if ticket.status == status_choice.0 %} checked='checked'{% endif %}>{{ status_choice.1 }}{% if forloop.last %}{% else %} &raquo;{% endif %}</label>
{% endfor %}
</div></dd>
{% endif %}

View File

@ -110,20 +110,8 @@
<dt><label>{% trans "New Status" %}</label></dt>
{% if not ticket.can_be_resolved %}<dd>{% trans "This ticket cannot be resolved or closed until the tickets it depends on are resolved." %}</dd>{% endif %}
<dd><div class="form-group">
{% for status_choice in ticket.STATUS_CHOICES %}
{% with status_choice_strfmt_s=status_choice.0|stringformat:"s" %}
{% if ticket.status == 1 and status_choice_strfmt_s in "2" %}{% else %}
{% if ticket.status == 2 and status_choice_strfmt_s in "1" %}{% else %}
{% if ticket.status == 3 and status_choice_strfmt_s not in "2,3,4" %}{% else %}
{% if ticket.status == 4 and status_choice_strfmt_s not in "2,4" %}{% else %}
{% if ticket.status == 5 and status_choice_strfmt_s not in "2,5" %}{% else %}
<label for='st_{{ status_choice.1|lower }}' class='{% if ticket.status == status_choice.0 %}active {% endif %}radio-inline'><input type='radio' name='new_status' value='{{ status_choice.0 }}' id='st_{{ status_choice.1|lower }}'{% if not ticket.can_be_resolved %} disabled='disabled'{% endif %}{% if ticket.status == status_choice.0 %} checked='checked'{% endif %}>{{ status_choice.1 }} &raquo;</label>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endwith %}
{% for status_choice in ticket.get_allowed_status_flow %}
<label for='st_{{ status_choice.1|lower }}' class='{% if ticket.status == status_choice.0 %}active {% endif %}radio-inline'><input type='radio' name='new_status' value='{{ status_choice.0 }}' id='st_{{ status_choice.1|lower }}'{% if not ticket.can_be_resolved %} disabled='disabled'{% endif %}{% if ticket.status == status_choice.0 %} checked='checked'{% endif %}>{{ status_choice.1 }}{% if forloop.last %}{% else %} &raquo;{% endif %}</label>
{% endfor %}
</div></dd>