diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-12-14 23:52:13 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-12-14 23:52:13 +0100 |
commit | dd005db8c38c1139c33a5f3b8b9e3e1556b28b38 (patch) | |
tree | e702a5e335c4366a1e27499a4db51e31b7f5c7b7 /ishtar_common/forms_common.py | |
parent | c6f301b76291d2f416f6a641fe92b03cd10076a7 (diff) | |
parent | b3c5ce577b925da4022f21ccdf8d138486557450 (diff) | |
download | Ishtar-dd005db8c38c1139c33a5f3b8b9e3e1556b28b38.tar.bz2 Ishtar-dd005db8c38c1139c33a5f3b8b9e3e1556b28b38.zip |
Merge branch 'master' of lysithea.proxience.net:/home/proxience/git/ishtar
Diffstat (limited to 'ishtar_common/forms_common.py')
-rw-r--r-- | ishtar_common/forms_common.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index 661709a09..b6cab8b6a 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -124,7 +124,7 @@ class PersonFormSelection(forms.Form): PersonSelect, models.Person), validators=[models.valid_id(models.Person)]) -class PersonForm(forms.Form): +class SimplePersonForm(forms.Form): form_label = _("Identity") associated_models = {'attached_to':models.Organization} title = forms.ChoiceField(label=_("Title"), choices=models.Person.TYPE) @@ -132,6 +132,15 @@ class PersonForm(forms.Form): validators=[name_validator]) name = forms.CharField(label=_(u"Name"), max_length=30, validators=[name_validator]) + address = forms.CharField(label=_(u"Address"), widget=forms.Textarea, + required=False) + address_complement = forms.CharField(label=_(u"Address complement"), + widget=forms.Textarea, required=False) + postal_code = forms.CharField(label=_(u"Postal code"), max_length=10, + required=False) + town = forms.CharField(label=_(u"Town"), max_length=30, required=False) + country = forms.CharField(label=_(u"Country"), max_length=30, + required=False) email = forms.CharField(label=_(u"Email"), max_length=40, required=False, validators=[validators.validate_email]) attached_to = forms.IntegerField(label=_("Current organization"), @@ -139,6 +148,8 @@ class PersonForm(forms.Form): reverse_lazy('autocomplete-organization'), associated_model=models.Organization, new=True), validators=[models.valid_id(models.Organization)], required=False) + +class PersonForm(SimplePersonForm): person_types = forms.MultipleChoiceField(label=_("Person type"), choices=[], widget=forms.CheckboxSelectMultiple) |