38 lines
1.5 KiB
HTML
38 lines
1.5 KiB
HTML
{% 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 %}
|