File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
app/code/Magento/Backend/Block/Widget/Form/Element Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -124,14 +124,18 @@ 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
+ $ params = $ this ->_getDependsJson ();
129
+
130
+ if ($ this ->_configOptions ) {
131
+ $ params .= ', ' . $ this ->_jsonEncoder ->encode ($ this ->_configOptions );
132
+ }
133
+
134
+ return "<script>
135
+ require(['mage/adminhtml/form'], function(){
136
+ new FormElementDependenceController( {$ params });
137
+ });
138
+ </script> " ;
135
139
}
136
140
137
141
/**
You can’t perform that action at this time.
0 commit comments