first version of defer/sick mode
This commit is contained in:
@@ -25,6 +25,29 @@
|
||||
<span class="task-list__recurrence">Every {{ task.recurrenceInterval }} {{ task.recurrenceUnit }}{{ task.recurrenceInterval != 1 ? 's' : '' }}</span>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
||||
{% if task.isActive %}
|
||||
<form
|
||||
class="task-list__snooze-form"
|
||||
hx-post="{{ path('app_task_snooze', {'id': task.id}) }}"
|
||||
hx-target="closest .task-list"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<input type="hidden" name="date" value="{{ selected_date|default('now')|date('Y-m-d') }}">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('snooze' ~ task.id) }}">
|
||||
<label class="visually-hidden" for="task-snooze-{{ task.id }}">Snooze {{ task.title }}</label>
|
||||
<select id="task-snooze-{{ task.id }}" name="snooze">
|
||||
<option value="tomorrow">Tomorrow</option>
|
||||
<option value="two_days">2 days</option>
|
||||
<option value="week">1 week</option>
|
||||
<option value="custom">Custom date</option>
|
||||
</select>
|
||||
<label class="visually-hidden" for="task-snooze-date-{{ task.id }}">Custom snooze date</label>
|
||||
<input id="task-snooze-date-{{ task.id }}" type="date" name="custom_date" min="{{ selected_date|default('now')|date_modify('+1 day')|date('Y-m-d') }}">
|
||||
<button type="submit">Snooze</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
<form
|
||||
class="task-list__remove-form"
|
||||
hx-post="{{ path('app_task_delete', {'id': task.id}) }}"
|
||||
|
||||
Reference in New Issue
Block a user