summaryrefslogtreecommitdiff
path: root/archaeological_context_records/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-01-15 18:34:54 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-01-15 18:34:54 +0100
commit8b9880fb22e0f58d1cbde5720e173ad164cb5a1f (patch)
tree0b0e03536d5e20e14a13d7805ce1e75f1fca04ea /archaeological_context_records/forms.py
parent1f374dd36b2901b35e4ab0bdbcfcbcbb93224f1a (diff)
downloadIshtar-8b9880fb22e0f58d1cbde5720e173ad164cb5a1f.tar.bz2
Ishtar-8b9880fb22e0f58d1cbde5720e173ad164cb5a1f.zip
UI: adapt each form to use the new date widget. Force localization of format.
Diffstat (limited to 'archaeological_context_records/forms.py')
-rw-r--r--archaeological_context_records/forms.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py
index d90f698dd..ea47be311 100644
--- a/archaeological_context_records/forms.py
+++ b/archaeological_context_records/forms.py
@@ -35,10 +35,11 @@ from archaeological_operations.models import Period, Parcel, Operation, \
import models
from ishtar_common import widgets
+from bootstrap_datepicker.widgets import DatePicker
from archaeological_operations.widgets import OAWidget
from ishtar_common.forms import FinalForm, FormSet, \
reverse_lazy, get_form_selection, TableSelect, ManageOldType, CustomForm,\
- FieldType
+ FieldType, IshtarForm
from ishtar_common.forms_common import get_town_field, SourceSelect
from archaeological_operations.forms import OperationSelect, ParcelField,\
RecordRelationsForm as OpeRecordRelationsForm, RecordRelationsFormSetBase
@@ -132,7 +133,7 @@ class RecordFormSelection(forms.Form):
return cleaned_data
-class RecordFormGeneral(CustomForm, ManageOldType, forms.Form):
+class RecordFormGeneral(CustomForm, ManageOldType):
form_label = _("General")
form_admin_name = _(u"Context record - 020 - General")
form_slug = "contextrecord-020-general"
@@ -163,9 +164,9 @@ class RecordFormGeneral(CustomForm, ManageOldType, forms.Form):
unit = forms.ChoiceField(label=_(u"Context record type"), required=False,
choices=[])
opening_date = forms.DateField(label=_(u"Opening date"),
- widget=widgets.JQueryDate, required=False)
+ widget=DatePicker, required=False)
closing_date = forms.DateField(label=_(u"Closing date"),
- widget=widgets.JQueryDate, required=False)
+ widget=DatePicker, required=False)
documentation = forms.MultipleChoiceField(
label=_("Documentation"), choices=[], required=False,
widget=forms.CheckboxSelectMultiple)