summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-10 20:49:13 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-10 20:49:13 +0200
commit3dae10a792d49d685debfe52eb7d61b9a6dc93f9 (patch)
tree45f1d910b67a30e44015735581ec9cdc6db51cdf /archaeological_warehouse/forms.py
parent58178a04b3e716a063b1c457018aafe28e5107dd (diff)
downloadIshtar-3dae10a792d49d685debfe52eb7d61b9a6dc93f9.tar.bz2
Ishtar-3dae10a792d49d685debfe52eb7d61b9a6dc93f9.zip
QA: lock/unlock (sites, operations, context records, finds, containers, warehouses)
Diffstat (limited to 'archaeological_warehouse/forms.py')
-rw-r--r--archaeological_warehouse/forms.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py
index ecf040a7e..5a558aa45 100644
--- a/archaeological_warehouse/forms.py
+++ b/archaeological_warehouse/forms.py
@@ -42,7 +42,8 @@ from bootstrap_datepicker.widgets import DatePicker
from ishtar_common.forms import name_validator, reverse_lazy, \
get_form_selection, ManageOldType, FinalForm, FormSet, \
- CustomForm, FieldType, HistorySelect, FormHeader, TableSelect
+ CustomForm, FieldType, HistorySelect, FormHeader, TableSelect, \
+ CustomFormSearch
from ishtar_common.forms_common import get_town_field
from archaeological_finds.forms import FindMultipleFormSelection, \
SelectFindBasketForm
@@ -109,7 +110,7 @@ class WarehouseSelect(CustomForm, TableSelect):
models.WarehouseType.get_help()
-class WarehouseFormSelection(forms.Form):
+class WarehouseFormSelection(CustomFormSearch):
SEARCH_AND_SELECT = True
form_label = _("Warehouse search")
associated_models = {'pk': models.Warehouse}
@@ -448,12 +449,15 @@ ContainerFormSelection = get_form_selection(
'ContainerFormSelection', _(u"Container search"), 'container',
models.Container, ContainerSelect, 'get-container',
_(u"You should select a container."), new=True,
- new_message=_(u"Add a new container"))
+ new_message=_(u"Add a new container"),
+ base_form_select=CustomFormSearch
+)
MainContainerFormSelection = get_form_selection(
'ContainerFormSelection', _(u"Container search"), 'pk',
models.Container, ContainerSelect, 'get-container',
- _(u"You should select a container."), gallery=True, map=True
+ _(u"You should select a container."), gallery=True, map=True,
+ base_form_select = CustomFormSearch
)