From 6c6062dc666dce915d04a27856777d5491db1380 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 11 Jan 2021 14:04:19 +0100 Subject: Add grammatical gender to organizations --- ishtar_common/forms_common.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ishtar_common/forms_common.py') diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index e15a4ef23..96a473c28 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -339,6 +339,10 @@ class OrganizationForm(ManageOldType, NewItemForm): organization_type = forms.ChoiceField(label=_("Organization type"), choices=[]) url = forms.URLField(label=_("Web address"), required=False) + grammatical_gender = forms.ChoiceField( + label=_("Grammatical gender"), + choices=[('', '--')] + list(models.GENDER), + required=False, help_text=_("Can be used by templates")) address = forms.CharField(label=_("Address"), widget=forms.Textarea, required=False) address_complement = forms.CharField(label=_("Address complement"), @@ -536,7 +540,8 @@ class BaseOrganizationForm(forms.ModelForm): class Meta: model = models.Organization - fields = ['name', 'organization_type', 'address', 'address_complement', + fields = ['name', 'organization_type', + 'grammatical_gender', 'address', 'address_complement', 'town', 'postal_code'] -- cgit v1.2.3