diff --git a/app/scouting/forms.py b/app/scouting/forms.py index a91ad3e..5d95e93 100644 --- a/app/scouting/forms.py +++ b/app/scouting/forms.py @@ -8,7 +8,20 @@ from .models import Competition, Role, Season, Specialty, Team class PlayerSearchForm(forms.Form): + SORT_CHOICES = [ + ("name_asc", "Name (A-Z)"), + ("name_desc", "Name (Z-A)"), + ("age_youngest", "Age (youngest first)"), + ("height_desc", "Height (tallest first)"), + ("weight_desc", "Weight (heaviest first)"), + ("points_desc", "Matching context points (high to low)"), + ("assists_desc", "Matching context assists (high to low)"), + ("ts_pct_desc", "Matching context TS% (high to low)"), + ("blocks_desc", "Matching context blocks (high to low)"), + ] + name = forms.CharField(required=False, label="Name") + sort = forms.ChoiceField(required=False, choices=SORT_CHOICES, initial="name_asc") position = forms.ChoiceField( required=False, diff --git a/app/scouting/templates/scouting/player_list.html b/app/scouting/templates/scouting/player_list.html index 614d7ec..ae8a05a 100644 --- a/app/scouting/templates/scouting/player_list.html +++ b/app/scouting/templates/scouting/player_list.html @@ -8,18 +8,30 @@