File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
app/code/Magento/Widget/Block/Adminhtml Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -40,13 +40,17 @@ protected function _construct()
40
40
$ this ->buttonList ->update ('reset ' , 'label ' , __ ('Cancel ' ));
41
41
$ this ->buttonList ->update ('reset ' , 'onclick ' , 'wWidget.closeModal() ' );
42
42
43
- $ this ->_formScripts [] = 'require(["mage/adminhtml/wysiwyg/widget"], '
44
- . ' function(){wWidget = new WysiwygWidget.Widget( '
45
- . '"widget_options_form", "select_widget_type", "widget_options", " '
46
- . $ this ->getUrl (
47
- 'adminhtml/*/loadOptions '
48
- ) . '", " ' . $ this ->getRequest ()->getParam (
49
- 'widget_target_id '
50
- ) . '");}); ' ;
43
+ $ this ->_formScripts [] = <<<EOJS
44
+ require(['mage/adminhtml/wysiwyg/widget'], function() {
45
+ wWidget = new WysiwygWidget.Widget(
46
+ 'widget_options_form',
47
+ 'select_widget_type',
48
+ 'widget_options',
49
+ ' {$ this ->getUrl ('adminhtml/*/loadOptions ' )}',
50
+ ' {$ this ->escapeJs ($ this ->getRequest ()->getParam ('widget_target_id ' ))}'
51
+ );
52
+ });
53
+ EOJS ;
54
+
51
55
}
52
56
}
You can’t perform that action at this time.
0 commit comments