File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
app/code/Magento/Widget/Block/Adminhtml/Widget
lib/internal/Magento/Framework/Data/Form/Element Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public function getMainFieldset()
91
91
if ($ this ->_getData ('main_fieldset ' ) instanceof \Magento \Framework \Data \Form \Element \Fieldset) {
92
92
return $ this ->_getData ('main_fieldset ' );
93
93
}
94
- $ mainFieldsetHtmlId = 'options_fieldset ' . md5 ( $ this ->getWidgetType ());
94
+ $ mainFieldsetHtmlId = 'options_fieldset ' . hash ( ' sha256 ' , $ this ->getWidgetType ());
95
95
$ this ->setMainFieldsetHtmlId ($ mainFieldsetHtmlId );
96
96
$ fieldset = $ this ->getForm ()->addFieldset (
97
97
$ mainFieldsetHtmlId ,
@@ -141,7 +141,6 @@ protected function _addField($parameter)
141
141
{
142
142
$ form = $ this ->getForm ();
143
143
$ fieldset = $ this ->getMainFieldset ();
144
- //$form->getElement('options_fieldset');
145
144
146
145
// prepare element data with values (either from request of from default values)
147
146
$ fieldName = $ parameter ->getKey ();
@@ -167,10 +166,12 @@ protected function _addField($parameter)
167
166
if (is_array ($ data ['value ' ])) {
168
167
foreach ($ data ['value ' ] as &$ value ) {
169
168
if (is_string ($ value )) {
169
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
170
170
$ value = html_entity_decode ($ value );
171
171
}
172
172
}
173
173
} else {
174
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
174
175
$ data ['value ' ] = html_entity_decode ($ data ['value ' ]);
175
176
}
176
177
Original file line number Diff line number Diff line change 4
4
* See COPYING.txt for license details.
5
5
*/
6
6
7
- /**
8
- * Data form abstract class
9
- *
10
- * @author Magento Core Team <[email protected] >
11
- */
12
7
namespace Magento \Framework \Data \Form \Element ;
13
8
9
+ use Magento \Framework \Phrase ;
10
+
11
+ /**
12
+ * Label form element.
13
+ */
14
14
class Label extends \Magento \Framework \Data \Form \Element \AbstractElement
15
15
{
16
16
/**
@@ -37,7 +37,7 @@ public function __construct(
37
37
public function getElementHtml ()
38
38
{
39
39
$ html = $ this ->getBold () ? '<div class="control-value special"> ' : '<div class="control-value"> ' ;
40
- if (is_string ($ this ->getValue ())) {
40
+ if (is_string ($ this ->getValue ()) || $ this -> getValue () instanceof Phrase ) {
41
41
$ html .= $ this ->getEscapedValue ();
42
42
}
43
43
You can’t perform that action at this time.
0 commit comments