From d19089c1bbb4b9057b819686217f22c3406369f4 Mon Sep 17 00:00:00 2001 From: Mladen Todorovic Date: Tue, 8 Nov 2016 12:11:31 +0100 Subject: [PATCH] Adjusted schema and new widget for auto_select functionality --- .../config/schema/dropzonejs_eb_widget.schema.yml | 9 +++++++++ .../EntityBrowser/Widget/InlineEntityFormMediaWidget.php | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/eb_widget/config/schema/dropzonejs_eb_widget.schema.yml b/modules/eb_widget/config/schema/dropzonejs_eb_widget.schema.yml index 72213db..3eb28cc 100644 --- a/modules/eb_widget/config/schema/dropzonejs_eb_widget.schema.yml +++ b/modules/eb_widget/config/schema/dropzonejs_eb_widget.schema.yml @@ -5,6 +5,9 @@ entity_browser.browser.widget.dropzonejs: submit_text: type: string label: 'Submit button text' + auto_select: + type: boolean + label: 'Automatically submit selection' upload_location: type: string label: 'Upload location' @@ -28,6 +31,9 @@ entity_browser.browser.widget.dropzonejs_media_entity: submit_text: type: string label: 'Submit button text' + auto_select: + type: boolean + label: 'Automatically submit selection' upload_location: type: string label: 'Upload location' @@ -51,6 +57,9 @@ entity_browser.browser.widget.dropzonejs_media_entity_inline_entity_form: submit_text: type: string label: 'Submit button text' + auto_select: + type: boolean + label: 'Automatically submit selection' upload_location: type: string label: 'Upload location' diff --git a/modules/eb_widget/src/Plugin/EntityBrowser/Widget/InlineEntityFormMediaWidget.php b/modules/eb_widget/src/Plugin/EntityBrowser/Widget/InlineEntityFormMediaWidget.php index 631d314..7272dbc 100644 --- a/modules/eb_widget/src/Plugin/EntityBrowser/Widget/InlineEntityFormMediaWidget.php +++ b/modules/eb_widget/src/Plugin/EntityBrowser/Widget/InlineEntityFormMediaWidget.php @@ -16,7 +16,8 @@ * @EntityBrowserWidget( * id = "dropzonejs_media_entity_inline_entity_form", * label = @Translation("Media Entity DropzoneJS with edit"), - * description = @Translation("Adds DropzoneJS upload integration that saves Media entities and allows to edit them.") + * description = @Translation("Adds DropzoneJS upload integration that saves Media entities and allows to edit them."), + * autoSelect = FALSE * ) */ class InlineEntityFormMediaWidget extends MediaEntityDropzoneJsEbWidget {