File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
lib/internal/Magento/Framework/Data Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ public function getElementHtml()
57
57
$ this ->addClass ('select multiselect admin__control-multiselect ' );
58
58
$ html = '' ;
59
59
if ($ this ->getCanBeEmpty ()) {
60
- $ html .= '<input type="hidden" name=" ' . parent ::getName () . '" value="" /> ' ;
60
+ $ html .= '
61
+ <input type="hidden" id=" ' . $ this ->getHtmlId () . '_hidden" name=" ' . parent ::getName () . '" value="" />
62
+ ' ;
61
63
}
62
64
if (!empty ($ this ->_data ['disabled ' ])) {
63
65
$ html .= '<input type="hidden" name=" ' . parent ::getName () . '_disabled" value="" /> ' ;
Original file line number Diff line number Diff line change @@ -27,10 +27,15 @@ protected function setUp()
27
27
public function testHiddenFieldPresentInMultiSelect ()
28
28
{
29
29
$ fieldName = 'fieldName ' ;
30
+ $ fieldId = 'fieldId ' ;
30
31
$ this ->_model ->setCanBeEmpty (true );
31
32
$ this ->_model ->setName ($ fieldName );
33
+ $ this ->_model ->setId ($ fieldId );
32
34
$ elementHtml = $ this ->_model ->getElementHtml ();
33
- $ this ->assertContains ('<input type="hidden" name=" ' . $ fieldName . '" ' , $ elementHtml );
35
+ $ this ->assertContains (
36
+ '<input type="hidden" id=" ' . $ fieldId . '_hidden" name=" ' . $ fieldName . '" ' ,
37
+ $ elementHtml
38
+ );
34
39
}
35
40
36
41
/**
You can’t perform that action at this time.
0 commit comments