Beispiel #1
0
 def __init__(self, *args, **kwargs):
     super().__init__(*args, **kwargs)
     self.fields['assigned_trip'].queryset = (
         Trip.objects
         .filter(trips_year=kwargs['instance'].trips_year)
         .select_related('section', 'template', 'template__triptype')
     )
     self.fields['assigned_trip'].label = 'Trip Assignment'
     crispify(self, submit_text='Update Assignment')
Beispiel #2
0
 def get_form(self, **kwargs):
     # save old assignment so we can show it after deletion
     self._assigned_trip = kwargs['instance'].assigned_trip
     form = LeaderAssignmentForm(
         self.kwargs['trips_year'], initial={'assigned_trip': None}, **kwargs
     )
     return crispify(form, 'Remove', 'btn-danger')
Beispiel #3
0
 def get_form(self, *args, **kwargs):
     form = super().get_form(*args, **kwargs)
     return crispify(form)
Beispiel #4
0
 def get_form(self, **kwargs):
     return crispify(super().get_form(**kwargs))
Beispiel #5
0
 def get_form(self, *args, **kwargs):
     form = super().get_form(*args, **kwargs)
     return crispify(form)
Beispiel #6
0
 def get_form(self, **kwargs):
     form = super().get_form(**kwargs)
     return crispify(form, 'Remove', 'btn-danger')
Beispiel #7
0
 def get_form(self, **kwargs):
     return crispify(super().get_form(**kwargs), submit_text='Save')
Beispiel #8
0
 def get_form(self, **kwargs):
     return crispify(super().get_form(**kwargs), 'Update')
Beispiel #9
0
 def get_form(self, **kwargs):
     form = super().get_form(**kwargs)
     label = 'Assign to %s' % (
         Trip.objects.get(pk=self.request.GET['trip_assignment'])
     )
     return crispify(form, label)
Beispiel #10
0
 def get_form(self, **kwargs):
     return crispify(super().get_form(**kwargs), submit_text='Save')
Beispiel #11
0
 def get_form(self, **kwargs):
     form = LeaderAssignmentForm(self.kwargs['trips_year'], **kwargs)
     label = 'Assign to %s' % (
         Trip.objects.get(pk=self.request.GET['assigned_trip'])
     )
     return crispify(form, label)
Beispiel #12
0
 def get_form(self, **kwargs):
     return crispify(forms.Form(**kwargs), 'Match')
Beispiel #13
0
 def get_form(self, **kwargs):
     form = super().get_form(**kwargs)
     label = 'Assign to %s' % (Trip.objects.get(
         pk=self.request.GET['trip_assignment']))
     return crispify(form, label)
Beispiel #14
0
 def get_form(self, *args, **kwargs):
     return crispify(super().get_form(*args, **kwargs))
Beispiel #15
0
 def get_form(self, **kwargs):
     form = super().get_form(**kwargs)
     return crispify(form, 'Remove', 'btn-danger')
Beispiel #16
0
 def __init__(self, **kwargs):
     super().__init__(**kwargs)
     crispify(self, submit_text='Update')
Beispiel #17
0
 def get_form(self, **kwargs):
     return crispify(super(UpdateEmail, self).get_form(**kwargs), 'Update')