parent
b1c329fcc9
commit
6fd0e5b8a4
|
@ -377,9 +377,6 @@ class CreateGroupHolidayView(GroupHolidayManagement, cbv.CreateView):
|
|||
|
||||
template_name_suffix = '_group_form'
|
||||
|
||||
def get_initial(self):
|
||||
return {'services': Service.objects.all()}
|
||||
|
||||
def form_valid(self, form):
|
||||
try:
|
||||
form.save()
|
||||
|
@ -394,6 +391,9 @@ create_group_holiday = CreateGroupHolidayView.as_view()
|
|||
class EditGroupHolidayView(GroupHolidayManagement, cbv.FormView):
|
||||
template_name = 'personnes/group_holiday_update_form.html'
|
||||
|
||||
def get_initial(self):
|
||||
return
|
||||
|
||||
def get_form_kwargs(self):
|
||||
kwargs = super(EditGroupHolidayView, self).get_form_kwargs()
|
||||
kwargs['instance'] = self.model.objects.get(pk = self.kwargs['pk'])
|
||||
|
|
Reference in New Issue