From 84219594bf960d1665fbac3ee195aa8ff85f13ba Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 1 Mar 2018 12:01:29 +0100 Subject: Find - Communicability: add in form (refs #3754) --- archaeological_finds/forms.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index 91a661adc..371bf3205 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -133,9 +133,11 @@ class FindForm(CustomForm, ManageOldType): form_label = _("Find") form_admin_name = _(u"Find - 020 - General") form_slug = "find-020-general" - base_models = ['get_first_base_find', 'object_type', 'material_type'] + base_models = ['get_first_base_find', 'object_type', 'material_type', + 'communicabilitie'] associated_models = {'material_type': models.MaterialType, 'object_type': models.ObjectType, + 'communicabilitie': models.CommunicabilityType, 'get_first_base_find__batch': models.BatchType, 'get_first_base_find__spatial_reference_system': SpatialReferenceSystem} @@ -177,6 +179,9 @@ class FindForm(CustomForm, ManageOldType): required=False) manufacturing_place = forms.CharField( label=_(u"Manufacturing place"), required=False) + communicabilitie = widgets.Select2MultipleField( + label=_(u"Communicability"), required=False + ) image = forms.ImageField( label=_(u"Image"), help_text=mark_safe(get_image_help()), max_length=255, required=False, widget=widgets.ImageFileInput()) @@ -223,6 +228,8 @@ class FindForm(CustomForm, ManageOldType): TYPES = [ FieldType('material_type', models.MaterialType, is_multiple=True), FieldType('object_type', models.ObjectType, is_multiple=True), + FieldType('communicabilitie', models.CommunicabilityType, + is_multiple=True), FieldType('get_first_base_find__batch', models.BatchType), ] -- cgit v1.2.3