diff options
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: | 
