Skip to content
Snippets Groups Projects
Commit 0380c48c authored by Valentin Groues's avatar Valentin Groues :eyes:
Browse files

#66 - show appointments types list as checkboxes

parent ff75c19c
No related branches found
No related tags found
1 merge request!16Resolve "Appointment type list"
...@@ -131,7 +131,7 @@ class AppointmentEditForm(ModelForm): ...@@ -131,7 +131,7 @@ class AppointmentEditForm(ModelForm):
datetime_when = forms.DateTimeField(label='Appointment on (YYYY-MM-DD HH:MM)', datetime_when = forms.DateTimeField(label='Appointment on (YYYY-MM-DD HH:MM)',
widget=forms.DateTimeInput(DATETIMEPICKER_DATE_ATTRS) widget=forms.DateTimeInput(DATETIMEPICKER_DATE_ATTRS)
) )
appointment_types = forms.ModelMultipleChoiceField(widget=forms.CheckboxSelectMultiple, appointment_types = forms.ModelMultipleChoiceField(required=False, widget=forms.CheckboxSelectMultiple,
queryset=AppointmentType.objects.all()) queryset=AppointmentType.objects.all())
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
...@@ -160,7 +160,7 @@ class AppointmentAddForm(ModelForm): ...@@ -160,7 +160,7 @@ class AppointmentAddForm(ModelForm):
datetime_when = forms.DateTimeField(label='Appointment on (YYYY-MM-DD HH:MM)', datetime_when = forms.DateTimeField(label='Appointment on (YYYY-MM-DD HH:MM)',
widget=forms.DateTimeInput(DATETIMEPICKER_DATE_ATTRS) widget=forms.DateTimeInput(DATETIMEPICKER_DATE_ATTRS)
) )
appointment_types = forms.ModelMultipleChoiceField(widget=forms.CheckboxSelectMultiple, appointment_types = forms.ModelMultipleChoiceField(required=False, widget=forms.CheckboxSelectMultiple,
queryset=AppointmentType.objects.all()) queryset=AppointmentType.objects.all())
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
...@@ -190,7 +190,7 @@ class VisitDetailForm(ModelForm): ...@@ -190,7 +190,7 @@ class VisitDetailForm(ModelForm):
) )
post_mail_sent = forms.RadioSelect() post_mail_sent = forms.RadioSelect()
appointment_types = forms.ModelMultipleChoiceField(widget=forms.CheckboxSelectMultiple, appointment_types = forms.ModelMultipleChoiceField(required=False, widget=forms.CheckboxSelectMultiple,
queryset=AppointmentType.objects.all()) queryset=AppointmentType.objects.all())
class Meta: class Meta:
...@@ -206,7 +206,7 @@ class VisitAddForm(ModelForm): ...@@ -206,7 +206,7 @@ class VisitAddForm(ModelForm):
datetime_end = forms.DateField(label="Visit ends on", datetime_end = forms.DateField(label="Visit ends on",
widget=forms.TextInput(attrs=DATEPICKER_DATE_ATTRS) widget=forms.TextInput(attrs=DATEPICKER_DATE_ATTRS)
) )
appointment_types = forms.ModelMultipleChoiceField(widget=forms.CheckboxSelectMultiple, appointment_types = forms.ModelMultipleChoiceField(required=False, widget=forms.CheckboxSelectMultiple,
queryset=AppointmentType.objects.all()) queryset=AppointmentType.objects.all())
class Meta: class Meta:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment