summaryrefslogtreecommitdiff
path: root/archaeological_files_pdl/forms.py
diff options
context:
space:
mode:
authorValérie-Emma Leroux <emma@iggdrasil.net>2017-04-07 11:40:31 +0200
committerValérie-Emma Leroux <emma@iggdrasil.net>2017-04-07 11:40:31 +0200
commit7f22d3c20cc24debfe123425efa63ec5293e4b4c (patch)
treef773b80964981c231c892ee5255b94285bc5620a /archaeological_files_pdl/forms.py
parent9127307734c85b816ac7dbb539b565ffb106d60f (diff)
parentda4af2ab5d105f6d2ce442b517e532b7570616e3 (diff)
downloadIshtar-7f22d3c20cc24debfe123425efa63ec5293e4b4c.tar.bz2
Ishtar-7f22d3c20cc24debfe123425efa63ec5293e4b4c.zip
Merge branch 'master' of git.iggdrasil.net:/srv/git/ishtar
Conflicts: archaeological_operations/templates/ishtar/sheet_operation.html
Diffstat (limited to 'archaeological_files_pdl/forms.py')
-rw-r--r--archaeological_files_pdl/forms.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/archaeological_files_pdl/forms.py b/archaeological_files_pdl/forms.py
index 4890eb5d6..73f1d789c 100644
--- a/archaeological_files_pdl/forms.py
+++ b/archaeological_files_pdl/forms.py
@@ -40,7 +40,7 @@ class FileFormGeneral(ManageOldType, forms.Form):
file_type = forms.ChoiceField(label=_("File type"), choices=[])
year = forms.IntegerField(label=_("Year"),
initial=lambda: datetime.datetime.now().year,
- validators=[validators.MinValueValidator(1900),
+ validators=[validators.MinValueValidator(1600),
validators.MaxValueValidator(2100)])
creation_date = forms.DateField(label=_(u"Creation date"),
initial=get_now, widget=widgets.JQueryDate)
@@ -86,9 +86,9 @@ class FileFormPlanning(forms.Form):
associated_models = {'town': Town, 'department': Department}
name = forms.CharField(label=_(u"Planning name"), required=False,
max_length=100)
- town = widgets.MultipleAutocompleteField(
- model=Town, label=_("Towns"), required=False)
- department = widgets.MultipleAutocompleteField(
+ town = widgets.Select2MultipleField(
+ model=Town, label=_("Towns"), required=False, remote=True)
+ department = widgets.Select2MultipleField(
model=Department, label=_("Departments"), required=False)
locality = forms.CharField(label=_(u"Locality"), max_length=100,
required=False)
@@ -118,9 +118,9 @@ class FileFormResearchAddress(forms.Form):
associated_models = {'town': Town, 'department': Department}
name = forms.CharField(label=_(u"Project name"), required=False,
max_length=100)
- town = widgets.MultipleAutocompleteField(
- model=Town, label=_("Towns"), required=False)
- department = widgets.MultipleAutocompleteField(
+ town = widgets.Select2MultipleField(
+ model=Town, label=_("Towns"), required=False, remote=True)
+ department = widgets.Select2MultipleField(
model=Department, label=_("Departments"), required=False)
locality = forms.CharField(label=_(u"Locality"), max_length=100,
required=False)
@@ -413,7 +413,7 @@ class FileFormInstruction(forms.Form):
instruction_deadline = forms.DateField(widget=widgets.JQueryDate,
required=False)
year = forms.IntegerField(label=_("Year"),
- validators=[validators.MinValueValidator(1900),
+ validators=[validators.MinValueValidator(1600),
validators.MaxValueValidator(2100)])
numeric_reference = forms.IntegerField(label=_("Numeric reference"),
required=False)