Skip to content

Commit

Permalink
Merge pull request #2772 from GeotrekCE/alphabetical_sites
Browse files Browse the repository at this point in the history
Sort sites by alphabetical order in outdoor course forms
  • Loading branch information
Chatewgne committed Sep 27, 2021
2 parents dbcebe2 + 4bdc832 commit c00f38f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ CHANGELOG

**Bug fixes**

* Fix dynamic forms on outdoor cotations display all cotations when selector empty
* Hide excluded POIs on Outdoor Site and Course detail pages
- Fix dynamic forms on outdoor cotations display all cotations when selector empty
- Hide excluded POIs on Outdoor Site and Course detail pages


**User Interface**

- Sort sites by alphabetical order in outdoor course forms


2.65.0 (2021-09-21)
----------------------
Expand Down
1 change: 1 addition & 0 deletions geotrek/outdoor/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class Meta:

def __init__(self, site=None, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['site'].queryset = Site.objects.only('name').order_by('name')
self.fields['site'].initial = site
self.fields['duration'].widget.attrs['min'] = '0'
for scale in RatingScale.objects.all():
Expand Down

0 comments on commit c00f38f

Please sign in to comment.