summaryrefslogtreecommitdiff
path: root/ishtar_common/forms_common.py
diff options
context:
space:
mode:
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
commitf788e692978740887e1474a3126dc93f0d7b3f17 (patch)
treec51bca262a2fb5d388845d62e3e41879af3db7ce /ishtar_common/forms_common.py
parent2b9093ec6b9cbc648297aed2244043a2b201f799 (diff)
downloadIshtar-f788e692978740887e1474a3126dc93f0d7b3f17.tar.bz2
Ishtar-f788e692978740887e1474a3126dc93f0d7b3f17.zip
Person: add salutation field (refs #3188)
Diffstat (limited to 'ishtar_common/forms_common.py')
-rw-r--r--ishtar_common/forms_common.py8
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'),