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

38 lines
1.5 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 = 'notes' %}
{% block page_title %}{% if note %}Notiz bearbeiten{% else %}Neue Notiz{% endif %} AzA Intern{% endblock %}
{% block content %}
<div class="page-header">
<h2>{% if note %}Notiz bearbeiten{% else %}Neue Notiz{% endif %}</h2>
<a href="/notes" class="btn btn-secondary">Zurück</a>
</div>
<div class="card">
<form method="post" action="{% if note %}/notes/{{ note.id }}/edit{% else %}/notes/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="{{ note.title if note else '' }}">
</div>
<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 note and note.category == c %}selected{% endif %}>{{ c }}</option>
{% endfor %}
</select>
</div>
<div class="form-group">
<label for="body">Inhalt</label>
<textarea id="body" name="body" rows="12">{{ note.body if note else '' }}</textarea>
</div>
<div class="form-group">
<label for="tags">Tags (kommagetrennt)</label>
<input type="text" id="tags" name="tags" value="{{ note.tags_str if note else '' }}">
</div>
<button type="submit" class="btn btn-primary">Speichern</button>
</form>
</div>
{% endblock %}