File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
lib/internal/Magento/Framework/Data Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public function getElementHtml()
5757 $ this ->addClass ('select multiselect admin__control-multiselect ' );
5858 $ html = '' ;
5959 if ($ this ->getCanBeEmpty ()) {
60- $ html .= '<input type="hidden" name=" ' . parent ::getName () . '" value="" /> ' ;
60+ $ html .= '<input type="hidden" id=" ' . $ this -> getHtmlId () . ' _hidden" name=" ' . parent ::getName () . '" value="" /> ' ;
6161 }
6262 if (!empty ($ this ->_data ['disabled ' ])) {
6363 $ html .= '<input type="hidden" name=" ' . parent ::getName () . '_disabled" value="" /> ' ;
Original file line number Diff line number Diff line change @@ -27,10 +27,14 @@ protected function setUp()
2727 public function testHiddenFieldPresentInMultiSelect ()
2828 {
2929 $ fieldName = 'fieldName ' ;
30+ $ fieldId = 'fieldId ' ;
3031 $ this ->_model ->setCanBeEmpty (true );
3132 $ this ->_model ->setName ($ fieldName );
33+ $ this ->_model ->setId ($ fieldId );
3234 $ 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 . '" ' , $ elementHtml
37+ );
3438 }
3539
3640 /**
You can’t perform that action at this time.
0 commit comments