diff options
Diffstat (limited to 'archaeological_files_pdl')
-rw-r--r-- | archaeological_files_pdl/forms.py | 4 | ||||
-rw-r--r-- | archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html | 23 |
2 files changed, 24 insertions, 3 deletions
diff --git a/archaeological_files_pdl/forms.py b/archaeological_files_pdl/forms.py index 928fc1e70..a182d0f0e 100644 --- a/archaeological_files_pdl/forms.py +++ b/archaeological_files_pdl/forms.py @@ -99,13 +99,13 @@ class FileFormPlanning(forms.Form): required=False) postal_code = forms.CharField(label=_(u"Postal code"), max_length=10, required=False) - total_surface = forms.IntegerField( + total_surface = forms.FloatField( required=False, widget=widgets.AreaWidget, label=_(u"Total surface (m2)"), validators=[validators.MinValueValidator(0), validators.MaxValueValidator(999999999)]) - total_developed_surface = forms.IntegerField( + total_developed_surface = forms.FloatField( widget=widgets.AreaWidget, label=_(u"Total developed surface (m2)"), required=False, diff --git a/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html b/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html index 1be5b1b36..304b58b76 100644 --- a/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html +++ b/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html @@ -8,6 +8,10 @@ <table> +{% if wizard.form.name.errors %}<tr> + <td colspan="2">{{wizard.form.name.errors}}</td> +</tr>{% endif %} + <tr class='required'> <th><label for="id_preventiveplanning-{{CURRENT_ACTION}}-name">Nom de l'aménagement</label></th> </tr> @@ -23,7 +27,6 @@ {% if wizard.form.main_town.errors %}<tr> <td colspan="2">{{wizard.form.main_town.errors}}</td> </tr>{% endif %} - <tr> <th colspan='2'><label for="id_preventiveplanning-{{CURRENT_ACTION}}-towns">{% trans "Towns" %}</label></th> </tr> @@ -31,6 +34,9 @@ <td>{{wizard.form.town|safe}}</td> </tr> +{% if wizard.form.department.errors %}<tr> + <td colspan="2">{{wizard.form.department.errors}}</td> +</tr>{% endif %} <tr> <th colspan='2'><label for="id_preventiveplanning-{{CURRENT_ACTION}}-department">{% trans "Departments" %}</label></th> </tr> @@ -38,6 +44,9 @@ <td>{{wizard.form.department|safe}}</td> </tr> +{% if wizard.form.locality.errors %}<tr> + <td colspan="2">{{wizard.form.locality.errors}}</td> +</tr>{% endif %} <tr> <th colspan='2'><label for="id_preventiveplanning-{{CURRENT_ACTION}}-locality">Lieu-dit</label></th> </tr> @@ -45,6 +54,9 @@ <td colspan='2'>{{wizard.form.locality|safe}}</td> </tr> +{% if wizard.form.address.errors %}<tr> + <td colspan="2">{{wizard.form.address.errors}}</td> +</tr>{% endif %} <tr> <th colspan='2'><label for="id_preventiveplanning-{{CURRENT_ACTION}}-address">Adresse</label></th> </tr> @@ -52,6 +64,9 @@ <td colspan='2'>{{wizard.form.address|safe}}</td> </tr> +{% if wizard.form.postal_code.errors %}<tr> + <td colspan="2">{{wizard.form.postal_code.errors}}</td> +</tr>{% endif %} <tr> <th colspan='2'><label for="id_preventiveplanning-{{CURRENT_ACTION}}-postal_code">Code postal</label></th> </tr> @@ -64,6 +79,9 @@ <h4>Surfaces</h4> <table> +{% if wizard.form.total_surface.errors %}<tr> + <td colspan="2">{{wizard.form.total_surface.errors}}</td> +</tr>{% endif %} <tr> <th><label for="id_preventiveplanning-{{CURRENT_ACTION}}-total_surface">Surface totale des terrains</label></th> </tr> @@ -71,6 +89,9 @@ <td>{{wizard.form.total_surface|safe}}</td> </tr> +{% if wizard.form.total_developed_surface.errors %}<tr> + <td colspan="2">{{wizard.form.total_developed_surface.errors}}</td> +</tr>{% endif %} <tr> <th><label for="id_preventiveplanning-{{CURRENT_ACTION}}-total_developed_surface">Surface totale aménagée</label></th> </tr> |