diff --git a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php index b40e6b9fe3ebf..14205e21cdc2d 100644 --- a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php +++ b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php @@ -60,9 +60,12 @@ protected function _prepareToRender() */ protected function _prepareArrayRow(\Magento\Framework\Object $row) { + $optionExtraAttr = []; + $optionExtraAttr['option_' . $this->_getGroupRenderer()->calcOptionHash($row->getData('customer_group_id'))] = + 'selected="selected"'; $row->setData( - 'option_extra_attr_' . $this->_getGroupRenderer()->calcOptionHash($row->getData('customer_group_id')), - 'selected="selected"' + 'option_extra_attrs', + $optionExtraAttr ); } } diff --git a/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml b/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml index 5bdb6bc3a8916..b11bdbaf028be 100644 --- a/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml +++ b/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml @@ -75,6 +75,7 @@ $_colspan = $block->isAddAfter() ? 2 : 1; templateValues = { getColumns() as $columnName => $column): ?> : '', + 'option_extra_attrs': {}, _id: '_' + d.getTime() + '_' + d.getMilliseconds() }; diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php index 62e3684db0609..a4f473ef75b3f 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php @@ -182,14 +182,14 @@ function ($value) { $this->transactionFactory = $this->getMock( 'Magento\Sales\Model\Order\Payment\TransactionFactory', - [], + ['create'], [], '', false ); $this->transactionCollectionFactory = $this->getMock( 'Magento\Sales\Model\Resource\Order\Payment\Transaction\CollectionFactory', - [], + ['create'], [], '', false diff --git a/lib/internal/Magento/Framework/View/Element/Html/Select.php b/lib/internal/Magento/Framework/View/Element/Html/Select.php index 49c9563179ed5..ab54697632ace 100644 --- a/lib/internal/Magento/Framework/View/Element/Html/Select.php +++ b/lib/internal/Magento/Framework/View/Element/Html/Select.php @@ -193,7 +193,7 @@ protected function _optionToHtml($option, $selected = false) { $selectedHtml = $selected ? ' selected="selected"' : ''; if ($this->getIsRenderToJsTemplate() === true) { - $selectedHtml .= ' #{option_extra_attr_' . self::calcOptionHash($option['value']) . '}'; + $selectedHtml .= ' <%= option_extra_attrs.option_' . self::calcOptionHash($option['value']) . ' %>'; } $params = ''; diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/SelectTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/SelectTest.php index f1c7564910154..d3660f32178ac 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/SelectTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/SelectTest.php @@ -157,8 +157,9 @@ public function testGetHtmlJs() $this->select->setValue($selectedValue); $result = ''; $this->select->setIsRenderToJsTemplate(true);