diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-01-21 21:05:28 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-01-21 21:05:28 +0100 |
commit | da5f5cbd97ad34ccd95b2ce366e03fbe28626ac3 (patch) | |
tree | 695caca9fafeec457b44d9fcc169315de08f8b7b /archaeological_files/forms.py | |
parent | 8661870960701ba1ac7b52a867ed14d10acacf93 (diff) | |
download | Ishtar-da5f5cbd97ad34ccd95b2ce366e03fbe28626ac3.tar.bz2 Ishtar-da5f5cbd97ad34ccd95b2ce366e03fbe28626ac3.zip |
Arcaheological file: adapt forms, models and sheet
Diffstat (limited to 'archaeological_files/forms.py')
-rw-r--r-- | archaeological_files/forms.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/archaeological_files/forms.py b/archaeological_files/forms.py index b075c6fc8..b87ef9ba5 100644 --- a/archaeological_files/forms.py +++ b/archaeological_files/forms.py @@ -47,6 +47,7 @@ from bootstrap_datepicker.widgets import DatePicker class FileSelect(TableSelect): + search_vector = forms.CharField(label=_(u"Full text search")) year = forms.IntegerField(label=_("Year")) numeric_reference = forms.IntegerField(label=_("Numeric reference")) internal_reference = forms.CharField(max_length=200, @@ -125,6 +126,7 @@ class FileSelect(TableSelect): class FileFormSelection(forms.Form): + SEARCH_AND_SELECT = True form_label = _("Archaeological file search") associated_models = {'pk': models.File} currents = {'pk': models.File} @@ -142,6 +144,7 @@ class FileFormSelection(forms.Form): raise forms.ValidationError(_(u"You should select a file.")) return cleaned_data + DATE_SOURCE = (('creation', _(u"Creation date")), ("reception", _(u"Reception date"))) |