26 lines
1.2 KiB
HTML
Executable File
26 lines
1.2 KiB
HTML
Executable File
{% extends "base.html" %}
|
|
{% block content %}
|
|
<h1 class="page-title">{{ title }}</h1>
|
|
<div class="panel">
|
|
{% if !error.is_empty() %}<p class="err">{{ error }}</p>{% endif %}
|
|
<form method="post" action="{{ action }}">
|
|
<input type="hidden" name="_csrf" value="{{ ctx.csrf }}">
|
|
<div class="formrow"><label>Titel</label><input name="titel" value="{{ titel }}" required></div>
|
|
<div class="formrow"><label>Kategorie</label>
|
|
<select name="kategorie">
|
|
{% for k in kategorien %}<option value="{{ k }}" {% if k.as_str() == kategorie.as_str() %}selected{% endif %}>{{ k }}</option>{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="formrow"><label>Inhalt</label><textarea name="inhalt" style="min-height:220px" required>{{ inhalt }}</textarea></div>
|
|
<div class="formrow"><label>Tags (kommagetrennt)</label><input name="tags" value="{{ tags }}"></div>
|
|
<button class="btn" type="submit">Speichern</button>
|
|
</form>
|
|
{% if !delete_action.is_empty() %}
|
|
<form method="post" action="{{ delete_action }}" style="margin-top:10px" data-confirm="Artikel wirklich loeschen?">
|
|
<input type="hidden" name="_csrf" value="{{ ctx.csrf }}">
|
|
<button class="btn ghost" type="submit">Loeschen</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|