diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2014-02-25 15:29:11 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2014-02-25 15:32:20 +0100 |
commit | 3117dd072d1dc43b6173d7a79fe5850f7e562dd7 (patch) | |
tree | bdd3269380a6b7fe0cda14544b6ce7e34b625ff8 /archaeological_files/forms.py | |
parent | e01ed92134b04f31f069bd7da1d438c19e35b93c (diff) | |
download | Ishtar-3117dd072d1dc43b6173d7a79fe5850f7e562dd7.tar.bz2 Ishtar-3117dd072d1dc43b6173d7a79fe5850f7e562dd7.zip |
Archaeological files forms: simplify a wizard step (refs #1673)
Diffstat (limited to 'archaeological_files/forms.py')
-rw-r--r-- | archaeological_files/forms.py | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/archaeological_files/forms.py b/archaeological_files/forms.py index 18e7bcc82..87f86d0d0 100644 --- a/archaeological_files/forms.py +++ b/archaeological_files/forms.py @@ -137,6 +137,14 @@ class FileFormGeneral(forms.Form): validators=[valid_id(models.File)]) comment = forms.CharField(label=_(u"Comment"), widget=forms.Textarea, required=False) + total_surface = forms.IntegerField(required=False, + widget=widgets.AreaWidget, + label=_(u"Total surface (m²)"), + validators=[validators.MinValueValidator(0), + validators.MaxValueValidator(999999999)]) + address = forms.CharField(label=_(u"Main address"), widget=forms.Textarea) + address_complement = forms.CharField(label=_(u"Main address - complement"), + required=False) def __init__(self, *args, **kwargs): super(FileFormGeneral, self).__init__(*args, **kwargs) @@ -156,20 +164,6 @@ class FileFormGeneralRO(FileFormGeneral): numeric_reference = forms.IntegerField(label=_(u"Numeric reference"), widget=forms.TextInput(attrs={'readonly':True})) -class FileFormAddress(forms.Form): - form_label = _(u"Address") - associated_models = {'town':Town} - total_surface = forms.IntegerField(required=False, - widget=widgets.AreaWidget, - label=_(u"Total surface (m²)"), - validators=[validators.MinValueValidator(0), - validators.MaxValueValidator(999999999)]) - address = forms.CharField(label=_(u"Main address"), widget=forms.Textarea) - address_complement = forms.CharField(label=_(u"Main address - complement"), - required=False) - postal_code = forms.CharField(label=_(u"Main address - postal code"), - max_length=10) - class FileFormPreventive(forms.Form): form_label = _(u"Preventive informations") associated_models = {'general_contractor':Person, |