From 88c9aeaeafd9bc77decbf0982be0fd9d20fd3993 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 23 May 2018 12:58:38 +0200 Subject: Wizards - JSON fields: inlines for custom form in admin pages (refs #4089) --- archaeological_finds/forms.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'archaeological_finds/forms.py') diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index 44d883b0f..8cb2fd0aa 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -43,7 +43,7 @@ from ishtar_common.forms import FormSet, FloatField, \ ManageOldType, FieldType, IshtarForm, FormHeader from ishtar_common.forms_common import get_town_field, \ - SourceSelect, CustomForm, BaseImageForm, BaseImageFormset + SourceSelect, CustomForm, BaseImageForm, BaseImageFormset, SourceForm from ishtar_common.utils import convert_coordinates_to_point from ishtar_common import widgets from bootstrap_datepicker.widgets import DatePicker @@ -63,7 +63,8 @@ from archaeological_finds.forms_treatments import TreatmentSelect, \ AdministrativeActTreatmentFileModifForm, SourceTreatmentFormSelection, \ SourceTreatmentFileFormSelection, TreatmentSourceFormSelection, \ TreatmentFileSourceFormSelection, DashboardForm as DashboardTreatmentForm, \ - DashboardTreatmentFileForm, TreatmentImagesFormset + DashboardTreatmentFileForm, TreatmentImagesFormset, \ + TreatmentFileSourceForm, TreatmentSourceForm __all__ = [ 'TreatmentSelect', 'TreatmentFormSelection', 'BaseTreatmentForm', @@ -78,7 +79,8 @@ __all__ = [ 'AdministrativeActTreatmentFileModifForm', 'SourceTreatmentFormSelection', 'SourceTreatmentFileFormSelection', 'TreatmentSourceFormSelection', 'TreatmentFileSourceFormSelection', 'DashboardTreatmentForm', - 'DashboardTreatmentFileForm', + 'DashboardTreatmentFileForm', 'TreatmentSourceForm', + 'TreatmentFileSourceForm', 'RecordFormSelection', 'FindForm', 'DateForm', 'DatingFormSet', 'PreservationForm', 'ImagesFormset', 'FindSelect', 'FindFormSelection', 'FindFormSelectionWarehouseModule', @@ -89,7 +91,7 @@ __all__ = [ 'FindDeletionForm', 'UpstreamFindFormSelection', 'SourceFindFormSelection', 'FindSourceSelect', 'FindSourceFormSelection', 'NewFindBasketForm', 'SelectFindBasketForm', 'DeleteFindBasketForm', 'FindBasketAddItemForm', - 'TreatmentImagesFormset' + 'TreatmentImagesFormset', 'FindSourceForm' ] logger = logging.getLogger(__name__) @@ -864,3 +866,7 @@ class FindBasketAddItemForm(forms.Form): raise PermissionDenied basket.items.add(item) return basket + + +class FindSourceForm(SourceForm): + form_slug = "findsource-general" -- cgit v1.2.3