summaryrefslogtreecommitdiff
path: root/archaeological_files_pdl
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2014-12-31 12:04:42 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-05-06 15:38:32 +0200
commitfecdc8f9a2ebab7b771f6afddef72f474347d3e7 (patch)
tree7b2d959e0a75e8f298c410ff4f3f4d46e700f3a3 /archaeological_files_pdl
parent54537c9b36ef15dd458a419a4d0ef947573f2676 (diff)
downloadIshtar-fecdc8f9a2ebab7b771f6afddef72f474347d3e7.tar.bz2
Ishtar-fecdc8f9a2ebab7b771f6afddef72f474347d3e7.zip
Add a deadline field for files
Diffstat (limited to 'archaeological_files_pdl')
-rw-r--r--archaeological_files_pdl/forms.py2
-rw-r--r--archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html11
-rw-r--r--archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html4
3 files changed, 15 insertions, 2 deletions
diff --git a/archaeological_files_pdl/forms.py b/archaeological_files_pdl/forms.py
index be1754347..21ed4238a 100644
--- a/archaeological_files_pdl/forms.py
+++ b/archaeological_files_pdl/forms.py
@@ -194,6 +194,8 @@ class FileFormInstruction(forms.Form):
validators=[valid_id(models.File)])
comment = forms.CharField(label=_(u"Comment"), widget=forms.Textarea,
required=False)
+ instruction_deadline = forms.DateField(widget=widgets.JQueryDate,
+ required=False)
year = forms.IntegerField(label=_("Year"),
validators=[validators.MinValueValidator(1900),
validators.MaxValueValidator(2100)])
diff --git a/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html b/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html
index b47de2cce..c2c4fc4d7 100644
--- a/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html
+++ b/archaeological_files_pdl/templates/ishtar/wizard/wizard_instruction.html
@@ -12,7 +12,7 @@
<th><label for="id_instruction-{{CURRENT_ACTION}}-in_charge">Dossier suivi par</label></th>
</tr>
<tr class='required'>
- <td>{{wizard.form.in_charge|safe}}</td>
+ <td>{{wizard.form.in_charge.errors}}{{wizard.form.in_charge|safe}}</td>
</tr>
<tr>
@@ -40,10 +40,17 @@
</tr>
<tr class='required'>
+ <th><label for="id_instruction-{{CURRENT_ACTION}}-instruction_deadline">Date limite d'instruction</label></th>
+</tr>
+<tr class='required'>
+ <td>{{wizard.form.instruction_deadline.errors}}{{wizard.form.instruction_deadline|safe}}</td>
+</tr>
+
+<tr class='required'>
<th><label for="id_instruction-{{CURRENT_ACTION}}-year">{{wizard.form.numeric_reference.label}}</label></th>
</tr>
<tr>
- <td>SRA <span class='small'>{{wizard.form.year|safe}}</span> - <span class='small'>{{wizard.form.numeric_reference|safe}}</span></td>
+ <td>{{wizard.form.numeric_reference.errors}}SRA <span class='small'>{{wizard.form.year|safe}}</span> - <span class='small'>{{wizard.form.numeric_reference|safe}}</span></td>
</tr>
</table>
diff --git a/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html b/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html
index 41527629d..5b3228cfb 100644
--- a/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html
+++ b/archaeological_files_pdl/templates/ishtar/wizard/wizard_preventiveplanning.html
@@ -20,6 +20,10 @@
<h4>Localisation</h4>
<table>
+{% if wizard.form.main_town.errors %}<tr>
+ <td colspan="2">{{wizard.form.main_town.errors}}</td>
+</tr>{% endif %}
+
<tr>
<td>{{wizard.form.main_town|safe}}</td>
</tr>