summaryrefslogtreecommitdiff
path: root/archaeological_files/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_files/forms.py')
-rw-r--r--archaeological_files/forms.py22
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,