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 @@ -124,14 +124,17 @@ protected function _toHtml()
124
124
if (!$ this ->_depends ) {
125
125
return '' ;
126
126
}
127
- return '<script>
128
- require(["mage/adminhtml/form"], function(){
129
- new FormElementDependenceController( ' .
130
- $ this ->_getDependsJson () .
131
- ($ this ->_configOptions ? ', ' .
132
- $ this ->_jsonEncoder ->encode (
133
- $ this ->_configOptions
134
- ) : '' ) . '); });</script> ' ;
127
+
128
+ $ dependsJson = $ this ->_getDependsJson ();
129
+ $ configOptions = $ this ->_configOptions ? $ this ->_jsonEncoder ->encode ($ this ->_configOptions ) : null ;
130
+ $ configOptionsStr = $ configOptions ? ', ' . $ configOptions : '' ;
131
+ $ paramsStr = $ dependsJson . $ configOptionsStr ;
132
+
133
+ return "<script>
134
+ require(['mage/adminhtml/form'], function(){
135
+ new FormElementDependenceController( {$ paramsStr });
136
+ });
137
+ </script> " ;
135
138
}
136
139
137
140
/**
You can’t perform that action at this time.
0 commit comments