File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
app/code/Magento/Backend/Block/Widget/Form/Element Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -120,14 +120,17 @@ protected function _toHtml()
120
120
if (!$ this ->_depends ) {
121
121
return '' ;
122
122
}
123
- return '<script>
124
- require(["mage/adminhtml/form"], function(){
125
- new FormElementDependenceController( ' .
126
- $ this ->_getDependsJson () .
127
- ($ this ->_configOptions ? ', ' .
128
- $ this ->_jsonEncoder ->encode (
129
- $ this ->_configOptions
130
- ) : '' ) . '); });</script> ' ;
123
+
124
+ $ dependsJson = $ this ->_getDependsJson ();
125
+ $ configOptions = $ this ->_configOptions ? $ this ->_jsonEncoder ->encode ($ this ->_configOptions ) : null ;
126
+ $ configOptionsStr = $ configOptions ? ', ' . $ configOptions : '' ;
127
+ $ paramsStr = $ dependsJson . $ configOptionsStr ;
128
+
129
+ return "<script>
130
+ require(['mage/adminhtml/form'], function(){
131
+ new FormElementDependenceController( {$ paramsStr });
132
+ });
133
+ </script> " ;
131
134
}
132
135
133
136
/**
You can’t perform that action at this time.
0 commit comments