diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-09-06 15:38:12 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-09-06 15:38:12 +0200 |
commit | 954e1a1426e53ea076f33388e2e942f615737def (patch) | |
tree | c51bca262a2fb5d388845d62e3e41879af3db7ce /ishtar_common/forms_common.py | |
parent | 69e66b06d4f9f0e72d2c60edcee406d52169b61e (diff) | |
download | Ishtar-954e1a1426e53ea076f33388e2e942f615737def.tar.bz2 Ishtar-954e1a1426e53ea076f33388e2e942f615737def.zip |
Person: add salutation field (refs #3188)
Diffstat (limited to 'ishtar_common/forms_common.py')
-rw-r--r-- | ishtar_common/forms_common.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index 7a77a6615..560a1abb3 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -261,6 +261,8 @@ class SimplePersonForm(ManageOldType, NewItemForm): associated_models = {'attached_to': models.Organization, 'title': models.TitleType} title = forms.ChoiceField(label=_("Title"), choices=[]) + salutation = forms.CharField(label=_("Salutation"), max_length=200, + required=False) surname = forms.CharField(label=_(u"Surname"), max_length=50, validators=[name_validator]) name = forms.CharField(label=_(u"Name"), max_length=200, @@ -363,14 +365,14 @@ class AccountFormSelection(forms.Form): class BasePersonForm(forms.ModelForm): class Meta: model = models.Person - fields = ['title', 'name', 'surname', 'address', 'address_complement', - 'town', 'postal_code'] + fields = ['title', 'salutation', 'name', 'surname', 'address', + 'address_complement', 'town', 'postal_code'] class BaseOrganizationPersonForm(forms.ModelForm): class Meta: model = models.Person - fields = ['attached_to', 'title', 'name', 'surname'] + fields = ['attached_to', 'title', 'salutation', 'name', 'surname'] widgets = {'attached_to': widgets.JQueryPersonOrganization( reverse_lazy('autocomplete-organization'), reverse_lazy('organization_create'), |