feat: Allow to set organization when creating adoption notice

This commit is contained in:
moanos [he/him] 2024-11-14 21:11:34 +01:00
parent 4a6584370e
commit d4f27e8f2f

View File

@ -51,6 +51,7 @@ class AdoptionNoticeForm(forms.ModelForm):
'group_only', 'group_only',
'searching_since', 'searching_since',
'location_string', 'location_string',
'organization',
'description', 'description',
'further_information', 'further_information',
), ),
@ -58,13 +59,14 @@ class AdoptionNoticeForm(forms.ModelForm):
class Meta: class Meta:
model = AdoptionNotice model = AdoptionNotice
fields = ['name', "group_only", "further_information", "description", "searching_since", "location_string"] fields = ['name', "group_only", "further_information", "description", "searching_since", "location_string",
"organization"]
class AdoptionNoticeFormWithDateWidget(AdoptionNoticeForm): class AdoptionNoticeFormWithDateWidget(AdoptionNoticeForm):
class Meta: class Meta:
model = AdoptionNotice model = AdoptionNotice
fields = ['name', "group_only", "further_information", "description", "searching_since", "location_string"] fields = ['name', "group_only", "further_information", "description", "searching_since", "location_string", "organization"]
widgets = { widgets = {
'searching_since': DateInput(), 'searching_since': DateInput(),
} }