Skip to content

Commit ee3cd0f

Browse files
author
Oleksii Korshenko
committed
Merge remote-tracking branch 'mainline/develop' into develop-prs
2 parents 3e9b63d + 694a66b commit ee3cd0f

File tree

17 files changed

+155
-28
lines changed

17 files changed

+155
-28
lines changed

app/code/Magento/Backend/Model/Auth/Session.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,13 @@ public function isLoggedIn()
168168
*/
169169
public function prolong()
170170
{
171+
$lifetime = $this->_config->getValue(self::XML_PATH_SESSION_LIFETIME);
171172
$cookieValue = $this->cookieManager->getCookie($this->getName());
173+
172174
if ($cookieValue) {
173175
$this->setUpdatedAt(time());
174176
$cookieMetadata = $this->cookieMetadataFactory->createPublicCookieMetadata()
177+
->setDuration($lifetime)
175178
->setPath($this->sessionConfig->getCookiePath())
176179
->setDomain($this->sessionConfig->getCookieDomain())
177180
->setSecure($this->sessionConfig->getCookieSecure())

app/code/Magento/Backend/Test/Unit/Model/Auth/SessionTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,21 @@ public function testProlong()
158158
{
159159
$name = session_name();
160160
$cookie = 'cookie';
161+
$lifetime = 900;
161162
$path = '/';
162163
$domain = 'magento2';
163164
$secure = true;
164165
$httpOnly = true;
165166

167+
$this->config->expects($this->once())
168+
->method('getValue')
169+
->with(\Magento\Backend\Model\Auth\Session::XML_PATH_SESSION_LIFETIME)
170+
->willReturn($lifetime);
166171
$cookieMetadata = $this->getMock(\Magento\Framework\Stdlib\Cookie\PublicCookieMetadata::class);
172+
$cookieMetadata->expects($this->once())
173+
->method('setDuration')
174+
->with($lifetime)
175+
->will($this->returnSelf());
167176
$cookieMetadata->expects($this->once())
168177
->method('setPath')
169178
->with($path)

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@
408408
<section id="web" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
409409
<label>Web</label>
410410
<tab>general</tab>
411-
<resource>Magento_Backend::web</resource>
411+
<resource>Magento_Config::web</resource>
412412
<group id="url" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="0" showInStore="0">
413413
<label>Url Options</label>
414414
<field id="use_store" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ protected function getOptionInfo()
518518
'dataType' => Form\Element\DataType\Text::NAME,
519519
'formElement' => Form\Element\Select::NAME,
520520
'componentType' => Form\Field::NAME,
521-
'component' => 'Magento_Bundle/js/components/bundle-input-type',
521+
'component' => 'Magento_Ui/js/form/element/select',
522522
'parentContainer' => 'product_bundle_container',
523523
'selections' => 'bundle_selections',
524524
'isDefaultIndex' => 'is_default',
@@ -594,8 +594,11 @@ protected function getBundleSelections()
594594
'config' => [
595595
'componentType' => Container::NAME,
596596
'isTemplate' => true,
597-
'component' => 'Magento_Ui/js/dynamic-rows/record',
598-
'is_collection' => true
597+
'component' => 'Magento_Bundle/js/components/bundle-record',
598+
'is_collection' => true,
599+
'imports' => [
600+
'onTypeChanged' => '${ $.provider }:${ $.bundleOptionsDataScope }.type'
601+
]
599602
],
600603
],
601604
],

app/code/Magento/Bundle/view/adminhtml/web/js/components/bundle-checkbox.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ define([
5858

5959
this.prefer = typeMap[type];
6060
this.elementTmpl(this.templates[typeMap[type]]);
61+
62+
if (this.prefer === 'radio' && this.checked()) {
63+
this.clearValues();
64+
}
6165
},
6266

6367
/**

app/code/Magento/Bundle/view/adminhtml/web/js/components/bundle-dynamic-rows-grid.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ define([
2929
recordIndex;
3030

3131
this.parsePagesData(data);
32+
this.templates.record.bundleOptionsDataScope = this.dataScope;
3233

3334
if (newData.length) {
3435
if (this.insertData().length) {

app/code/Magento/Bundle/view/adminhtml/web/js/components/bundle-input-type.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
* See COPYING.txt for license details.
44
*/
55

6+
/**
7+
* @deprecated Not used anymore
8+
* @see Magento_Bundle/js/components/bundle-record
9+
* @see Magento_Bundle/js/components/bundle-checkbox
10+
*/
611
define([
712
'Magento_Ui/js/form/element/select',
813
'uiRegistry'
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
define([
6+
'Magento_Ui/js/dynamic-rows/record',
7+
'uiRegistry'
8+
], function (Record, registry) {
9+
'use strict';
10+
11+
return Record.extend({
12+
/**
13+
* @param {String} val - type of Input Type
14+
*/
15+
onTypeChanged: function (val) {
16+
var columnVisibility = !(val === 'multi' || val === 'checkbox');
17+
18+
registry.async(this.name + '.' + 'selection_can_change_qty')(function (elem) {
19+
elem.visible(columnVisibility);
20+
});
21+
}
22+
});
23+
});

app/code/Magento/Directory/etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<section id="currency" translate="label" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
1111
<label>Currency Setup</label>
1212
<tab>general</tab>
13-
<resource>Magento_Backend::currency</resource>
13+
<resource>Magento_Config::currency</resource>
1414
<group id="options" translate="label" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
1515
<label>Currency Options</label>
1616
<field id="base" translate="label comment" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">

app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ protected function _construct()
8484
*/
8585
public function getTotals()
8686
{
87-
$this->getQuote()->setTotalsCollectedFlag(false);
8887
$this->getQuote()->collectTotals();
8988
if ($this->getQuote()->isVirtual()) {
9089
$totals = $this->getQuote()->getBillingAddress()->getTotals();

0 commit comments

Comments
 (0)