99 lines
3.5 KiB
HTML
99 lines
3.5 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>Reihenfolge</label>
|
|
<input type="number"
|
|
name="reihenfolge"
|
|
value="{{ thema.reihenfolge or 0 }}">
|
|
</div>
|
|
|
|
<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="kurztitel">Bild</label>
|
|
<input type="text" id="pic" name="pic" value="{{ thema.pic or '' }}" required>
|
|
</div-->
|
|
|
|
<div class="form-group">
|
|
<label for="pic">Bild / Logo</label>
|
|
<select id="pic" name="pic">
|
|
<option value="">-- kein Bild --</option>
|
|
{% for image in image_files %}
|
|
<option value="{{ image }}"
|
|
{% if thema.pic == image %}selected{% endif %}>
|
|
{{ image }}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
</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 %} |