Add ticket status setter and prevent draft text loss
- Set ticket state (Offen / In Bearbeitung / Warten auf Schließen / Geschlossen) from the ticket detail page via a live PUT to Zammad; pending-close gets a default pending time and the change is synced back so it isn't flagged as an external change - Replace the disruptive meta-refresh with a JS auto-refresh that pauses while a text field has unsent content or focus - Persist reply/new-ticket drafts to localStorage and restore them after a reload or accidental navigation Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+11
-1
@@ -20,6 +20,16 @@
|
||||
<div><dt>zuletzt geändert</dt><dd>{{ ticket.zammad_updated_at|dt }}</dd></div>
|
||||
<div><dt>geschlossen</dt><dd>{{ ticket.last_close_at|dt }}</dd></div>
|
||||
</dl>
|
||||
<form method="post" action="{{ url_for('set_state', ticket_id=ticket.id) }}" class="state-form">
|
||||
<label for="state_id">Status ändern:</label>
|
||||
<select id="state_id" name="state_id">
|
||||
{% for s in settable_states %}
|
||||
<option value="{{ s.id }}" {{ 'selected' if s.id == ticket.state_id }}>{{ s.label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button class="btn-sm" type="submit">setzen</button>
|
||||
<span class="hint-inline">wirkt live in Zammad</span>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="panel">
|
||||
@@ -75,7 +85,7 @@
|
||||
{% if ticket.state != 'closed' %}
|
||||
<form method="post" action="{{ url_for('reply_preview', ticket_id=ticket.id) }}"
|
||||
class="reply-form attach-form" enctype="multipart/form-data">
|
||||
<textarea name="body" rows="4" required
|
||||
<textarea name="body" rows="4" required data-draft
|
||||
placeholder="Antwort an den EPI-Support verfassen… (Screenshot mit Strg+V einfügen)"></textarea>
|
||||
{% include "_attach.html" %}
|
||||
<div class="form-actions">
|
||||
|
||||
Reference in New Issue
Block a user