summaryrefslogtreecommitdiff
path: root/ishtar_common/forms_common.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-12-03 13:05:06 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-12-03 13:05:06 +0100
commitfd0a0165c3a06ecea377cc9a16ac2706b1dc9d40 (patch)
tree038feacbb6eaff4d5e531ec417652009ed2f1ce5 /ishtar_common/forms_common.py
parent677bc165441d508429295f476a28a966efa2ce29 (diff)
downloadIshtar-fd0a0165c3a06ecea377cc9a16ac2706b1dc9d40.tar.bz2
Ishtar-fd0a0165c3a06ecea377cc9a16ac2706b1dc9d40.zip
Better management of raw_names for search and windows
Diffstat (limited to 'ishtar_common/forms_common.py')
-rw-r--r--ishtar_common/forms_common.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py
index 0e6a34b74..1ff9532e9 100644
--- a/ishtar_common/forms_common.py
+++ b/ishtar_common/forms_common.py
@@ -258,6 +258,7 @@ class SimplePersonForm(NewItemForm):
validators=[name_validator])
name = forms.CharField(label=_(u"Name"), max_length=30,
validators=[name_validator])
+ raw_name = forms.CharField(label=_(u"Raw name"), max_length=255)
address = forms.CharField(label=_(u"Address"), widget=forms.Textarea,
required=False)
address_complement = forms.CharField(label=_(u"Address complement"),
@@ -278,6 +279,10 @@ class SimplePersonForm(NewItemForm):
associated_model=models.Organization, new=True),
validators=[models.valid_id(models.Organization)], required=False)
+ def __init__(self, *args, **kwargs):
+ super(SimplePersonForm, self).__init__(*args, **kwargs)
+ self.fields['raw_name'].widget.attrs['readonly'] = True
+
class BasePersonForm(forms.ModelForm):
class Meta: