diff options
Diffstat (limited to 'archaeological_warehouse/forms.py')
-rw-r--r-- | archaeological_warehouse/forms.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py index e13255efc..27f03e752 100644 --- a/archaeological_warehouse/forms.py +++ b/archaeological_warehouse/forms.py @@ -33,7 +33,8 @@ from bootstrap_datepicker.widgets import DatePicker from ishtar_common.forms import name_validator, reverse_lazy, \ get_form_selection, TableSelect, ManageOldType, FinalForm, FormSet, \ CustomForm, FieldType -from ishtar_common.forms_common import get_image_help +from ishtar_common.forms_common import get_image_help, BaseImageFormset, \ + BaseImageForm from archaeological_finds.forms import FindMultipleFormSelection, \ SelectFindBasketForm @@ -160,6 +161,14 @@ class WarehouseForm(CustomForm, ManageOldType, forms.Form): return new_item +ImagesFormset = formset_factory(BaseImageForm, can_delete=True, + formset=BaseImageFormset) +ImagesFormset.file_upload = True +ImagesFormset.form_label = _(u"Images") +ImagesFormset.form_admin_name = _(u"Warehouse - 025 - Images") +ImagesFormset.form_slug = "warehouse-020-images" + + class WarehouseDeletionForm(FinalForm): confirm_msg = _(u"Would you like to delete this warehouse?") confirm_end_msg = _(u"Would you like to delete this warehouse?") |