diff options
Diffstat (limited to 'archaeological_warehouse/forms.py')
-rw-r--r-- | archaeological_warehouse/forms.py | 12 |
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 ) |