diff options
| 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 | 
| commit | a657ca2449e804fc60ae40422cd463840813285f (patch) | |
| tree | 038feacbb6eaff4d5e531ec417652009ed2f1ce5 /ishtar_common/forms_common.py | |
| parent | 57fa943dbd781e6c7352865c07b1f025ffa5117e (diff) | |
| download | Ishtar-a657ca2449e804fc60ae40422cd463840813285f.tar.bz2 Ishtar-a657ca2449e804fc60ae40422cd463840813285f.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.py | 5 | 
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:  | 
