summaryrefslogtreecommitdiff
path: root/ishtar_common/forms_common.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/forms_common.py')
-rw-r--r--ishtar_common/forms_common.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py
index aef94476c..cb75e4026 100644
--- a/ishtar_common/forms_common.py
+++ b/ishtar_common/forms_common.py
@@ -256,8 +256,9 @@ class PersonFormSelection(forms.Form):
class SimplePersonForm(NewItemForm):
form_label = _("Identity")
- associated_models = {'attached_to': models.Organization}
- title = forms.ChoiceField(label=_("Title"), choices=models.Person.TYPE)
+ associated_models = {'attached_to': models.Organization,
+ 'title': models.TitleType}
+ title = forms.ChoiceField(label=_("Title"), choices=[])
surname = forms.CharField(label=_(u"Surname"), max_length=50,
validators=[name_validator])
name = forms.CharField(label=_(u"Name"), max_length=200,
@@ -308,6 +309,7 @@ class SimplePersonForm(NewItemForm):
def __init__(self, *args, **kwargs):
super(SimplePersonForm, self).__init__(*args, **kwargs)
self.fields['raw_name'].widget.attrs['readonly'] = True
+ self.fields['title'].choices = models.TitleType.get_types()
class PersonUserSelect(PersonSelect):