add options in news form
This commit is contained in:
@@ -50,6 +50,7 @@ def index(request):
|
||||
|
||||
if year == "":
|
||||
year = None
|
||||
month = None
|
||||
|
||||
if not year and month:
|
||||
messages.info(
|
||||
|
||||
@@ -49,8 +49,6 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
<label class="block">
|
||||
<span class="text-gray-700">Jahr</span>
|
||||
<select class="block w-full mt-1 rounded-md border-gray-300 shadow-sm focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50"
|
||||
@@ -58,7 +56,13 @@
|
||||
id="id_year"
|
||||
name="year"
|
||||
>
|
||||
|
||||
{% for elem in formset.year %}
|
||||
{% if forloop.first %}
|
||||
<option value="">Alle</option>
|
||||
{% else %}
|
||||
{{ elem }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label
|
||||
@@ -71,32 +75,30 @@
|
||||
x-transition:leave-end="opacity-0"
|
||||
>
|
||||
<span class="text-gray-700">Monat</span>
|
||||
<select class="block w-full mt-1 rounded-md border-gray-300 shadow-sm focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50">
|
||||
<option value="" selected></option>
|
||||
<option value="1">Jänner</option>
|
||||
<option value="2">Februar</option>
|
||||
<option value="3">März</option>
|
||||
<option value="4">April</option>
|
||||
<option value="5">Mai</option>
|
||||
<option value="6">Juni</option>
|
||||
<option value="7">Juli</option>
|
||||
<option value="8">August</option>
|
||||
<option value="9">September</option>
|
||||
<option value="10">Oktober</option>
|
||||
<option value="11">November</option>
|
||||
<option value="12">Dezember</option>
|
||||
<select class="block w-full mt-1 rounded-md border-gray-300 shadow-sm focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50"
|
||||
id="id_month"
|
||||
name="month"
|
||||
>
|
||||
{% for elem in formset.month %}
|
||||
{% if forloop.first %}
|
||||
<option value=""></option>
|
||||
{% else %}
|
||||
{{ elem }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label class="inline-flex items-center">
|
||||
<input type="checkbox" class="rounded border-gray-300 text-proprietary shadow-sm focus:border-blue-300 focus:ring focus:ring-offset-0 focus:ring-blue-200 focus:ring-opacity-50">
|
||||
<input type="checkbox" id="compact_view" name="checkbox" value="compact_view" {% if compact_view %} checked {% endif %} class="rounded border-gray-300 text-proprietary shadow-sm focus:border-blue-300 focus:ring focus:ring-offset-0 focus:ring-blue-200 focus:ring-opacity-50">
|
||||
<span class="ml-2 text-gray-700">Kompakte Ansicht</span>
|
||||
</label>
|
||||
<label class="inline-flex items-center">
|
||||
<input type="checkbox" class="rounded border-gray-300 text-proprietary shadow-sm focus:border-blue-300 focus:ring focus:ring-offset-0 focus:ring-blue-200 focus:ring-opacity-50">
|
||||
<input type="checkbox" id="fet_meeting_only" name="checkbox" value="fet_meeting_only" {% if fet_meeting_only %} checked {% endif %} class="rounded border-gray-300 text-proprietary shadow-sm focus:border-blue-300 focus:ring focus:ring-offset-0 focus:ring-blue-200 focus:ring-opacity-50">
|
||||
<span class="ml-2 text-gray-700">nur FET-Sitzungen</span>
|
||||
</label>
|
||||
<input type="submit" class="block btn btn-primary" value="Anzeigen">
|
||||
<input type="submit" class="block btn btn-primary" value="Anzeigen" name="btn_input">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<button id="modal-trigger-1" class="z-10 trigger fixed bottom-4 right-4 bg-proprietary-darker text-blue-50 shadow-lg text-2xl rounded sm:hidden"
|
||||
@@ -126,41 +128,4 @@
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="grid-container">
|
||||
<div class="grid-x grid-margin-x">
|
||||
<div class="cell medium-8">
|
||||
{% for message in messages %}
|
||||
<p id="messages" style="background-color: red">{{message}}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="grid-x grid-margin-x padding-top-1">
|
||||
|
||||
{{ formset.management_form }}
|
||||
|
||||
{% for form in formset %}
|
||||
<div class="cell medium-3 large-2 small-10">
|
||||
{{ form.label }}
|
||||
{{ form }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="cell medium-3 large-2 small-10 align-self-middle">
|
||||
<input type="checkbox" id="compact_view" name="checkbox" value="compact_view" {% if compact_view %} checked {% endif %}>
|
||||
<label for="compact_view">kompakte Ansicht</label>
|
||||
|
||||
<input type="checkbox" id="fet_meeting_only" name="checkbox" value="fet_meeting_only" {% if fet_meeting_only %} checked {% endif %}>
|
||||
<label for="fet_meeting_only">nur FET Sitzung</label>
|
||||
</div>
|
||||
|
||||
<div class="cell medium-3 large-2 small-10 align-self-bottom">
|
||||
<input type="submit" class="button" name="btn_input" value="Suchen">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user