first version of defer/sick mode
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
<div>{{ form_row(form.estimatedDurationMinutes) }}</div>
|
||||
<div>{{ form_row(form.priority) }}</div>
|
||||
<div>{{ form_row(form.category) }}</div>
|
||||
<div>{{ form_row(form.requiredOnSickDay) }}</div>
|
||||
<div>{{ form_row(form.deferDays) }}</div>
|
||||
</div>
|
||||
<div class="task-composer__row">
|
||||
<div>{{ form_row(form.scheduledFor) }}</div>
|
||||
|
||||
@@ -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}) }}"
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<a class="user" href="{{ path('app_user_index') }}">
|
||||
{% if user.username != "" %} {{ user.username|first }}{% endif %}
|
||||
</a>
|
||||
<div class="container">
|
||||
<div class="task-list-header">
|
||||
<button class="weather-location" type="button" data-weather-location data-location-url="{{ path('app_task_location') }}" data-location-token="{{ csrf_token('weather_location') }}">
|
||||
|
||||
Reference in New Issue
Block a user