def __init__(self, user, *args, **kwargs): """ Add hour_slot selection based on the current school, and ordered by week_day and starts_at :param user: the user logged, the school is retrieved by her. """ super(AbsenceBlockForm, self).__init__(user, *args, **kwargs) assign_html_style_to_visible_forms_fields(self)
def __init__(self, user, *args, **kwargs): """ Add hour_slot selection based on the current school, and ordered by week_day and starts_at :param user: the user logged, the school is retrieved by her. """ super(AbsenceBlockCreateForm, self).__init__(user, *args, **kwargs) # Get the correct hours slots in the MultipleChoiceField self.fields['hour_slots'] = forms.ModelMultipleChoiceField( queryset=HourSlot.objects.filter( school=get_school_from_user(self.user).id).order_by( 'hour_slots_group__name', 'day_of_week', 'starts_at'), help_text=_( "Do you want to assign multiple absence blocks?" " Use shift key and the mouse click to select multiple hour slots." ), label=_('Hour slots')) assign_html_style_to_visible_forms_fields(self)
def __init__(self, user, *args, **kwargs): super(AssignmentForm, self).__init__(user, *args, **kwargs) self.fields['room'].required = False assign_html_style_to_visible_forms_fields(self)
def __init__(self, user, *args, **kwargs): super(HoursPerTeacherInClassForm, self).__init__(user, *args, **kwargs) assign_html_style_to_visible_forms_fields(self)
def __init__(self, user, *args, **kwargs): super(CoursesYearlyLoadForm, self).__init__(user, *args, **kwargs) assign_html_style_to_visible_forms_fields(self)
def __init__(self, user, *args, **kwargs): super(SubjectForm, self).__init__(user, *args, **kwargs) assign_html_style_to_visible_forms_fields(self)
def __init__(self, *args, **kwargs): super(HourSlotsGroupForm, self).__init__(*args, **kwargs) assign_html_style_to_visible_forms_fields(self)
def __init__(self, *args, **kwargs): super(RoomForm, self).__init__(*args, **kwargs) assign_html_style_to_visible_forms_fields(self)
def __init__(self, user, *args, **kwargs): super(AdminSchoolCreationForm, self).__init__(*args, **kwargs) assign_html_style_to_visible_forms_fields(self)
def __init__(self, user, *args, **kwargs): super(TeacherCreationForm, self).__init__(user, *args, **kwargs) assign_html_style_to_visible_forms_fields(self)