DasUnternehmen/templates/admin/thema_form.html

74 lines
2.6 KiB
HTML

{% extends "base.html" %}
{% block content %}
<div class="content-card">
<h1>
{% if mode == "edit" %}
Thema bearbeiten
{% else %}
Neues Thema erstellen
{% endif %}
</h1>
<form method="post" class="admin-form">
<div class="form-group">
<label for="kurztitel">Kurztitel</label>
<input type="text" id="kurztitel" name="kurztitel" value="{{ thema.kurztitel or '' }}" required>
</div>
<div class="form-group">
<label for="titel">Titel</label>
<input type="text" id="titel" name="titel" value="{{ thema.titel or '' }}" required>
</div>
<div class="form-group">
<label for="infotext">InfoText</label>
<textarea id="infotext" name="infotext" rows="6">{{ thema.infotext or '' }}</textarea>
</div>
<div class="form-group">
<label for="zusatztext">Zusatztext</label>
<textarea id="zusatztext" name="zusatztext" rows="6">{{ thema.zusatztext or '' }}</textarea>
</div>
<div class="form-group">
<label>Ansprechpartner</label>
<div class="checkbox-list">
{% for ap in ansprechpartner %}
<label class="checkbox-item">
<input
type="checkbox"
name="ansprechpartner_ids"
value="{{ ap.id }}"
{% if ap.id in selected_ansprechpartner_ids %}checked{% endif %}
>
<span>{{ ap.name }}{% if ap.email %} ({{ ap.email }}){% endif %}</span>
</label>
{% endfor %}
</div>
</div>
<div class="form-group">
<label>Zugeordnete Branchen</label>
<div class="checkbox-list">
{% for branche in branchen %}
<label class="checkbox-item">
<input
type="checkbox"
name="branche_ids"
value="{{ branche.id }}"
{% if branche.id in selected_branche_ids %}checked{% endif %}
>
<span>{{ branche.branchenname }}</span>
</label>
{% endfor %}
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn">Speichern</button>
<a class="btn btn-secondary" href="{{ url_for('admin_themen') }}">Abbrechen</a>
</div>
</form>
</div>
{% endblock %}