diff options
Diffstat (limited to 'ishtar_common/forms_common.py')
-rw-r--r-- | ishtar_common/forms_common.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index f389ab84d..4dd55c38a 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -1261,7 +1261,8 @@ class DocumentForm(forms.ModelForm, CustomForm, ManageOldType): form_admin_name = _("Document - General") form_slug = "document-general" file_upload = True - extra_form_modals = ["author", "person", "organization", "documenttag"] + extra_form_modals = ["author", "person", "organization", "documenttag", + "container"] associated_models = {'source_type': models.SourceType, 'support_type': models.SupportType, 'publisher': models.Organization, @@ -1271,7 +1272,7 @@ class DocumentForm(forms.ModelForm, CustomForm, ManageOldType): title = forms.CharField(label=_("Title"), required=False, validators=[validators.MaxLengthValidator(200)]) source_type = widgets.ModelChoiceField( - model=models.SourceType, label=_("Source type"), choices=[], + model=models.SourceType, label=_("Type"), choices=[], required=False) support_type = widgets.ModelChoiceField( model=models.SupportType, label=_("Support"), choices=[], @@ -1320,7 +1321,7 @@ class DocumentForm(forms.ModelForm, CustomForm, ManageOldType): label=_("Source"), model=models.Document, required=False) source_free_input = forms.CharField( - label=_("Source free input"), + label=_("Source - free input"), validators=[validators.MaxLengthValidator(500)], required=False) associated_url = forms.URLField( max_length=1000, required=False, @@ -1376,8 +1377,8 @@ class DocumentForm(forms.ModelForm, CustomForm, ManageOldType): 'authors', 'receipt_date', 'receipt_date_in_documentation', 'creation_date', 'publisher', 'language', 'isbn', 'issn', 'licenses', - 'container', "container_ref", 'source', 'source_free_input', + 'container', "container_ref", 'comment', 'description', 'additional_information', 'duplicate' ] @@ -1388,6 +1389,7 @@ class DocumentForm(forms.ModelForm, CustomForm, ManageOldType): 'authors': FormHeader(_("Authors")), 'receipt_date': FormHeader(_("Dates")), 'publisher': FormHeader(_("Publishing"), collapse=True), + 'source': FormHeader(_("Source"), collapse=True), 'container': FormHeader(_("Container"), collapse=True), 'comment': FormHeader(_("Advanced"), collapse=True), 'finds': FormHeader(_("Related items")), @@ -1397,6 +1399,10 @@ class DocumentForm(forms.ModelForm, CustomForm, ManageOldType): ("tags", ("ishtar_common.add_documenttag",), {"new": True}), ("authors", ("ishtar_common.add_author",), {"new": True}), ("publisher", ("ishtar_common.add_organization",), {"new": True}), + ("container", ("archaeological_warehouse.add_container",), + {"new": True}), + ("container_ref", ("archaeological_warehouse.add_container",), + {"new": True}), ] def __init__(self, *args, **kwargs): |