diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-01-11 14:04:19 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-02-28 12:15:23 +0100 |
commit | 6c6062dc666dce915d04a27856777d5491db1380 (patch) | |
tree | 483f2df6fb353af6bfb3f70eb4ffadb0d3ba5374 /ishtar_common/forms_common.py | |
parent | ed955319c88a6c945e3508b7ecfd8c0271e4046b (diff) | |
download | Ishtar-6c6062dc666dce915d04a27856777d5491db1380.tar.bz2 Ishtar-6c6062dc666dce915d04a27856777d5491db1380.zip |
Add grammatical gender to organizations
Diffstat (limited to 'ishtar_common/forms_common.py')
-rw-r--r-- | ishtar_common/forms_common.py | 7 |
1 files changed, 6 insertions, 1 deletions
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'] |