adding bulk action assign rowers
This commit is contained in:
@@ -1213,6 +1213,7 @@ class ForceCurveMultipleCompareForm(forms.Form):
|
||||
bulkactions = (
|
||||
('remove','remove'),
|
||||
('export','export'),
|
||||
('rower assign','rower assign'),
|
||||
)
|
||||
destinations = (
|
||||
('C2','C2'),
|
||||
@@ -1230,6 +1231,15 @@ class ExportChoices(forms.Form):
|
||||
choices=destinations, label='Destination', required=False, initial='strava'
|
||||
)
|
||||
|
||||
class AssignChoices(forms.Form):
|
||||
remove_workout = forms.BooleanField(initial=False, required=False)
|
||||
destination = forms.ModelMultipleChoiceField(label='Rowers', required=False,
|
||||
queryset=Rower.objects.filter(), widget=forms.CheckboxSelectMultiple())
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(AssignChoices, self).__init__(*args, **kwargs)
|
||||
self.fields['destination'].queryset = Rower.objects.filter()
|
||||
|
||||
class WorkoutMultipleCompareForm(forms.Form):
|
||||
workouts = forms.ModelMultipleChoiceField(
|
||||
queryset=Workout.objects.filter(),
|
||||
|
||||
Reference in New Issue
Block a user