feat: add task deletion for all users
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
<h2>{% if mode == 'edit' %}Änderungen für {{ task.title }}{% else %}Neue Aufgabe anlegen{% endif %}</h2>
|
||||
<form method="post" class="form-grid form-grid--two">
|
||||
{{ form.hidden_tag() }}
|
||||
{% if mode == 'edit' %}
|
||||
<input type="hidden" name="next" value="{{ next_url }}">
|
||||
{% endif %}
|
||||
|
||||
<div class="field field--full">
|
||||
{{ form.title.label }}
|
||||
@@ -57,8 +60,18 @@
|
||||
<div class="form-actions field--full">
|
||||
{{ form.submit(class_='button') }}
|
||||
<a class="button button--ghost" href="{{ url_for('tasks.all_tasks') }}">Abbrechen</a>
|
||||
{% if mode == 'edit' %}
|
||||
<button
|
||||
type="submit"
|
||||
class="button button--ghost button--danger"
|
||||
formmethod="post"
|
||||
formaction="{{ url_for('tasks.delete', task_id=task.id) }}"
|
||||
onclick="return confirm('Diese Aufgabe wirklich löschen?');"
|
||||
>
|
||||
Aufgabe löschen
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user