mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-25 01:13:31 +01:00
Removed ticket new status logic from templates
This commit is contained in:
parent
8b53ef9505
commit
c7a9a1ab54
@ -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 }} »</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 %} »{% endif %}</label>
|
||||
{% endfor %}
|
||||
</div></dd>
|
||||
{% endif %}
|
||||
|
@ -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 }} »</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 %} »{% endif %}</label>
|
||||
{% endfor %}
|
||||
</div></dd>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user