jedna kategoria dla listy

This commit is contained in:
Mateusz Gruszczyński
2025-08-13 22:36:16 +02:00
parent ee40ee101c
commit 82c84b5ce6
6 changed files with 31 additions and 19 deletions

View File

@@ -81,7 +81,9 @@
<div class="mb-4">
<label class="form-label">Kategorie</label>
<select id="categories" name="categories" multiple>
<select id="categories" name="categories"
class="form-select tom-dark bg-dark text-white border-secondary rounded">
<option value=""> brak </option>
{% for cat in categories %}
<option value="{{ cat.id }}" {% if cat.id in selected_categories %}selected{% endif %}>
{{ cat.name }}

View File

@@ -32,7 +32,7 @@
<td>{{ lst.created_at.strftime('%Y-%m-%d') }}</td>
<td style="min-width: 220px;">
<select name="categories_{{ lst.id }}" multiple
class="form-select bg-dark text-white border-secondary">
class="form-select tom-dark bg-dark text-white border-secondary rounded">
{% for cat in categories %}
<option value="{{ cat.id }}" {% if cat in lst.categories %}selected{% endif %}>
{{ cat.name }}

View File

@@ -64,8 +64,10 @@
<label class="form-check-label" for="is_archived">Zarchiwizowana</label>
</div>
<label for="title" class="form-label">Kategorie</label>
<select id="categories" name="categories" multiple>
<label for="title" class="form-label">Kategoria</label>
<select id="categories" name="categories"
class="form-select tom-dark bg-dark text-white border-secondary rounded">
<option value=""> brak </option>
{% for cat in categories %}
<option value="{{ cat.id }}" {% if cat.id in selected_categories %}selected{% endif %}>
{{ cat.name }}