Files
aza/AzA march 2026/intern_portal/templates/task_form.html
2026-05-23 21:31:34 +02:00

73 lines
3.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "layout.html" %}
{% set active = 'tasks' %}
{% block page_title %}{% if task %}Aufgabe bearbeiten{% else %}Neue Aufgabe{% endif %} AzA Intern{% endblock %}
{% block content %}
<div class="page-header">
<h2>{% if task %}Aufgabe bearbeiten{% else %}Neue Aufgabe{% endif %}</h2>
<a href="/tasks" class="btn btn-secondary">Zurück</a>
</div>
<div class="card">
<form method="post" action="{% if task %}/tasks/{{ task.id }}/edit{% else %}/tasks/new{% endif %}">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
<div class="form-group">
<label for="title">Titel *</label>
<input type="text" id="title" name="title" required value="{{ task.title if task else '' }}">
</div>
<div class="form-group">
<label for="description">Beschreibung</label>
<textarea id="description" name="description">{{ task.description if task else '' }}</textarea>
</div>
<div class="grid-2">
<div class="form-group">
<label for="status">Status</label>
<select id="status" name="status">
{% for s in task_statuses %}
<option value="{{ s }}" {% if task and task.status == s %}selected{% elif not task and s == 'Neu' %}selected{% endif %}>{{ s }}</option>
{% endfor %}
</select>
</div>
<div class="form-group">
<label for="priority">Priorität</label>
<select id="priority" name="priority">
{% for p in task_priorities %}
<option value="{{ p }}" {% if task and task.priority == p %}selected{% elif not task and p == 'normal' %}selected{% endif %}>{{ p }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="grid-2">
<div class="form-group">
<label for="category">Kategorie</label>
<select id="category" name="category">
<option value=""></option>
{% for c in categories %}
<option value="{{ c }}" {% if task and task.category == c %}selected{% endif %}>{{ c }}</option>
{% endfor %}
</select>
</div>
<div class="form-group">
<label for="assigned_to">Zugewiesen an</label>
<select id="assigned_to" name="assigned_to">
<option value=""></option>
{% for u in users %}
<option value="{{ u.id }}" {% if task and task.assigned_to == u.id %}selected{% endif %}>{{ u.username }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="grid-2">
<div class="form-group">
<label for="due_date">Fälligkeitsdatum</label>
<input type="date" id="due_date" name="due_date" value="{{ task.due_date if task and task.due_date else '' }}">
</div>
<div class="form-group">
<label for="tags">Tags (kommagetrennt)</label>
<input type="text" id="tags" name="tags" value="{{ task.tags_str if task else '' }}" placeholder="z.B. Flyer, Q2">
</div>
</div>
<button type="submit" class="btn btn-primary">Speichern</button>
</form>
</div>
{% endblock %}