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 16
16
class Widget extends \Magento \Backend \Block \Widget \Form \Container
17
17
{
18
18
/**
19
- * @return void
19
+ * @inheritdoc
20
20
*/
21
21
protected function _construct ()
22
22
{
@@ -36,12 +36,16 @@ protected function _construct()
36
36
$ this ->buttonList ->update ('save ' , 'region ' , 'footer ' );
37
37
$ this ->buttonList ->update ('save ' , 'data_attribute ' , []);
38
38
39
- $ this ->_formScripts [] = 'require(["mage/adminhtml/wysiwyg/widget"], function(){wWidget = new WysiwygWidget.Widget( ' .
40
- '"widget_options_form", "select_widget_type", "widget_options", " ' .
41
- $ this ->getUrl (
42
- 'adminhtml/*/loadOptions '
43
- ) . '", " ' . $ this ->getRequest ()->getParam (
44
- 'widget_target_id '
45
- ) . '");}); ' ;
39
+ $ this ->_formScripts [] = <<<EOJS
40
+ require(['mage/adminhtml/wysiwyg/widget'], function() {
41
+ wWidget = new WysiwygWidget.Widget(
42
+ 'widget_options_form',
43
+ 'select_widget_type',
44
+ 'widget_options',
45
+ ' {$ this ->getUrl ('adminhtml/*/loadOptions ' )}',
46
+ ' {$ this ->_escaper ->escapeJs ((string )$ this ->getRequest ()->getParam ('widget_target_id ' ))}'
47
+ );
48
+ });
49
+ EOJS ;
46
50
}
47
51
}
You can’t perform that action at this time.
0 commit comments