Skip to content

Commit e3f2d69

Browse files
author
Ievgen Shakhsuvarov
committed
Merge branch 'develop' of github.corp.ebay.com:magento2/magento2ce into develop
2 parents 25912e8 + 4148723 commit e3f2d69

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@ protected function _prepareToRender()
6060
*/
6161
protected function _prepareArrayRow(\Magento\Framework\Object $row)
6262
{
63+
$optionExtraAttr = [];
64+
$optionExtraAttr['option_' . $this->_getGroupRenderer()->calcOptionHash($row->getData('customer_group_id'))] =
65+
'selected="selected"';
6366
$row->setData(
64-
'option_extra_attr_' . $this->_getGroupRenderer()->calcOptionHash($row->getData('customer_group_id')),
65-
'selected="selected"'
67+
'option_extra_attrs',
68+
$optionExtraAttr
6669
);
6770
}
6871
}

app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ $_colspan = $block->isAddAfter() ? 2 : 1;
7575
templateValues = {
7676
<?php foreach ($block->getColumns() as $columnName => $column): ?>
7777
<?php echo $columnName ?>: '',
78+
'option_extra_attrs': {},
7879
<?php endforeach; ?>
7980
_id: '_' + d.getTime() + '_' + d.getMilliseconds()
8081
};

app/code/Magento/Sales/Test/Unit/Model/Order/PaymentTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,14 @@ function ($value) {
182182

183183
$this->transactionFactory = $this->getMock(
184184
'Magento\Sales\Model\Order\Payment\TransactionFactory',
185-
[],
185+
['create'],
186186
[],
187187
'',
188188
false
189189
);
190190
$this->transactionCollectionFactory = $this->getMock(
191191
'Magento\Sales\Model\Resource\Order\Payment\Transaction\CollectionFactory',
192-
[],
192+
['create'],
193193
[],
194194
'',
195195
false

lib/internal/Magento/Framework/View/Element/Html/Select.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ protected function _optionToHtml($option, $selected = false)
193193
{
194194
$selectedHtml = $selected ? ' selected="selected"' : '';
195195
if ($this->getIsRenderToJsTemplate() === true) {
196-
$selectedHtml .= ' #{option_extra_attr_' . self::calcOptionHash($option['value']) . '}';
196+
$selectedHtml .= ' <%= option_extra_attrs.option_' . self::calcOptionHash($option['value']) . ' %>';
197197
}
198198

199199
$params = '';

lib/internal/Magento/Framework/View/Test/Unit/Element/Html/SelectTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,9 @@ public function testGetHtmlJs()
157157
$this->select->setValue($selectedValue);
158158

159159
$result = '<select name="testName" id="testId" class="testClass" title="testTitle" >'
160-
. '<option value="testValue" #{option_extra_attr_4016862802} >testLabel</option>'
161-
. '<option value="selectedValue" selected="selected" #{option_extra_attr_662265145} >selectedLabel</option>'
160+
. '<option value="testValue" <%= option_extra_attrs.option_4016862802 %> >testLabel</option>'
161+
. '<option value="selectedValue" selected="selected" <%= option_extra_attrs.option_662265145 %> >'
162+
. 'selectedLabel</option>'
162163
. '</select>';
163164

164165
$this->select->setIsRenderToJsTemplate(true);

0 commit comments

Comments
 (0)