diff options
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 |
commit | a33ee7dac0ee1f1c561664598eddfdfa3d2e9314 (patch) | |
tree | 0b0e03536d5e20e14a13d7805ce1e75f1fca04ea /archaeological_context_records | |
parent | 72b51a6558b78717c2fb55aba03abe2c8bbd9f72 (diff) | |
download | Ishtar-a33ee7dac0ee1f1c561664598eddfdfa3d2e9314.tar.bz2 Ishtar-a33ee7dac0ee1f1c561664598eddfdfa3d2e9314.zip |
UI: adapt each form to use the new date widget. Force localization of format.
Diffstat (limited to 'archaeological_context_records')
-rw-r--r-- | archaeological_context_records/forms.py | 9 |
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) |