From 8f18e7aa3ef8750faaf8c4cd136827555fdf66e4 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 10 Sep 2019 20:49:13 +0200 Subject: QA: lock/unlock (sites, operations, context records, finds, containers, warehouses) --- archaeological_warehouse/forms.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'archaeological_warehouse/forms.py') 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 ) -- cgit v1.2.3