mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Use Select2 for subevent and other long selections (#763)
* Use Select2 for subevent and other long selections * Minor correction
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
{% load i18n %}
|
||||
<p>
|
||||
<select name="subevent" class="form-control">
|
||||
<option value="">{% trans "All dates" context "subevent" %}</option>
|
||||
{% for se in request.event.subevents.all %}
|
||||
<option value="{{ se.id }}"
|
||||
{% if request.GET.subevent|add:0 == se.id %}selected="selected"{% endif %}>
|
||||
<select name="subevent" class="form-control simple-subevent-choice" data-model-select2="event"
|
||||
data-select2-url="{% url "control:event.subevents.select2" organizer=request.event.organizer.slug event=request.event.slug %}"
|
||||
data-placeholder="{% trans "All dates" context "subevent" %}">
|
||||
{% for se in selected_subevents %}
|
||||
<option value="{{ se.pk }}" selected>
|
||||
{{ se.name }} – {{ se.get_date_range_display }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button class="btn btn-primary" type="submit">{% trans "Show" %}</button>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user