mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-24 03:02:23 +00:00
Better select widget when searching organizers
This commit is contained in:
parent
4075f6cf78
commit
731dfc049f
@ -137,7 +137,9 @@ class TournamentForm(forms.ModelForm):
|
||||
format='%Y-%m-%d %H:%M')
|
||||
self.fields["syntheses_second_phase_limit"].widget = forms.DateTimeInput(attrs={'type': 'datetime-local'},
|
||||
format='%Y-%m-%d %H:%M')
|
||||
self.fields["organizers"].widget = forms.CheckboxSelectMultiple()
|
||||
self.fields["organizers"].widget.attrs['class'] = 'selectpicker'
|
||||
self.fields["organizers"].widget.attrs['data-live-search'] = 'true'
|
||||
self.fields["organizers"].widget.attrs['data-live-search-normalize'] = 'true'
|
||||
self.fields["organizers"].queryset = VolunteerRegistration.objects.all()
|
||||
|
||||
class Meta:
|
||||
|
@ -23,11 +23,16 @@
|
||||
<link rel="stylesheet" href="{% static 'fontawasome/css/all.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'fontawasome/css/v4-shims.css' %}">
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.18/css/bootstrap-select.min.css">
|
||||
|
||||
{# JQuery, Bootstrap and Turbolinks JavaScript #}
|
||||
<script src="{% static 'jquery/jquery-3.6.0.min.js' %}"></script>
|
||||
<script src="{% static 'bootstrap/js/bootstrap.bundle.min.js' %}"></script>
|
||||
<script src="{% static 'turbolinks/turbolinks.js' %}"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.14.0-beta3/js/bootstrap-select.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.18/js/i18n/defaults-fr_FR.min.js"></script>
|
||||
|
||||
{# Si un formulaire requiert des données supplémentaires (notamment JS), les données sont chargées #}
|
||||
{% if form.media %}
|
||||
{{ form.media }}
|
||||
|
Loading…
Reference in New Issue
Block a user