]> git.0d.be Git - django-panik-nonstop.git/commitdiff
use checkboxes for nonstop zone selection on track page
authorFrédéric Péters <fpeters@0d.be>
Wed, 18 Aug 2021 05:45:39 +0000 (07:45 +0200)
committerFrédéric Péters <fpeters@0d.be>
Wed, 18 Aug 2021 05:45:39 +0000 (07:45 +0200)
nonstop/forms.py
nonstop/templates/nonstop/track_detail.html

index 4e5f76200e166630cb95505da005fd1d56bfca81..489cc09980e06a73f93ad1e74467f52768ddedcf 100644 (file)
@@ -40,6 +40,9 @@ class TrackMetaForm(forms.ModelForm):
     class Meta:
         model = Track
         fields = ['language', 'instru', 'sabam', 'cfwb', 'nonstop_zones']
+        widgets = {
+            'nonstop_zones': widgets.MulticheckWidget,
+        }
 
 
 class TrackSearchForm(forms.Form):
index 4e2ae644229b00de9ffb57a1c461be811881b3a3..4f2e21f4611b169deb2705ae24d622b20fa55895 100644 (file)
@@ -89,6 +89,13 @@ $(function() {
 });
 
 </script>
+<style>
+ul#id_nonstop_zones, #id_nonstop_zones li {
+  margin: 0;
+  padding: 0;
+  list-style: none;
+}
+</style>
 </form>
 {% endif %}
 </aside>