Skip to content

Commit b8056c3

Browse files
Merge branch 2.2-develop into ENGCOM-4247-magento-magento2-20529
2 parents 68a2cea + 37ad124 commit b8056c3

File tree

14 files changed

+263
-84
lines changed

14 files changed

+263
-84
lines changed

app/code/Magento/Backend/Controller/Adminhtml/System/Design/Save.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
*/
77
namespace Magento\Backend\Controller\Adminhtml\System\Design;
88

9+
/**
10+
* Save design action.
11+
*/
912
class Save extends \Magento\Backend\Controller\Adminhtml\System\Design
1013
{
1114
/**
@@ -26,6 +29,8 @@ protected function _filterPostData($data)
2629
}
2730

2831
/**
32+
* Save design action.
33+
*
2934
* @return \Magento\Backend\Model\View\Result\Redirect
3035
*/
3136
public function execute()
@@ -54,10 +59,10 @@ public function execute()
5459
} catch (\Exception $e) {
5560
$this->messageManager->addErrorMessage($e->getMessage());
5661
$this->_objectManager->get(\Magento\Backend\Model\Session::class)->setDesignData($data);
57-
return $resultRedirect->setPath('adminhtml/*/', ['id' => $design->getId()]);
62+
return $resultRedirect->setPath('*/*/edit', ['id' => $design->getId()]);
5863
}
5964
}
6065

61-
return $resultRedirect->setPath('adminhtml/*/');
66+
return $resultRedirect->setPath('*/*/');
6267
}
6368
}

app/code/Magento/Customer/Model/Vat.php

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,18 +179,21 @@ public function checkVatNumber($countryCode, $vatNumber, $requesterCountryCode =
179179
return $gatewayResponse;
180180
}
181181

182+
$countryCodeForVatNumber = $this->getCountryCodeForVatNumber($countryCode);
183+
$requesterCountryCodeForVatNumber = $this->getCountryCodeForVatNumber($requesterCountryCode);
184+
182185
try {
183186
$soapClient = $this->createVatNumberValidationSoapClient();
184187

185188
$requestParams = [];
186-
$requestParams['countryCode'] = $countryCode;
189+
$requestParams['countryCode'] = $countryCodeForVatNumber;
187190
$vatNumberSanitized = $this->isCountryInEU($countryCode)
188-
? str_replace([' ', '-', $countryCode], ['', '', ''], $vatNumber)
191+
? str_replace([' ', '-', $countryCodeForVatNumber], ['', '', ''], $vatNumber)
189192
: str_replace([' ', '-'], ['', ''], $vatNumber);
190193
$requestParams['vatNumber'] = $vatNumberSanitized;
191-
$requestParams['requesterCountryCode'] = $requesterCountryCode;
194+
$requestParams['requesterCountryCode'] = $requesterCountryCodeForVatNumber;
192195
$reqVatNumSanitized = $this->isCountryInEU($requesterCountryCode)
193-
? str_replace([' ', '-', $requesterCountryCode], ['', '', ''], $requesterVatNumber)
196+
? str_replace([' ', '-', $requesterCountryCodeForVatNumber], ['', '', ''], $requesterVatNumber)
194197
: str_replace([' ', '-'], ['', ''], $requesterVatNumber);
195198
$requestParams['requesterVatNumber'] = $reqVatNumSanitized;
196199
// Send request to service
@@ -301,4 +304,22 @@ public function isCountryInEU($countryCode, $storeId = null)
301304
);
302305
return in_array($countryCode, $euCountries);
303306
}
307+
308+
/**
309+
* Returns the country code to use in the VAT number which is not always the same as the normal country code
310+
*
311+
* @param string $countryCode
312+
* @return string
313+
*/
314+
private function getCountryCodeForVatNumber(string $countryCode): string
315+
{
316+
// Greece uses a different code for VAT numbers then its country code
317+
// See: http://ec.europa.eu/taxation_customs/vies/faq.html#item_11
318+
// And https://en.wikipedia.org/wiki/VAT_identification_number:
319+
// "The full identifier starts with an ISO 3166-1 alpha-2 (2 letters) country code
320+
// (except for Greece, which uses the ISO 639-1 language code EL for the Greek language,
321+
// instead of its ISO 3166-1 alpha-2 country code GR)"
322+
323+
return $countryCode === 'GR' ? 'EL' : $countryCode;
324+
}
304325
}

app/code/Magento/Ui/view/base/web/templates/grid/filters/elements/ui-select.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
class="action-select admin__action-multiselect"
3737
data-role="advanced-select"
3838
data-bind="
39-
css: {_active: multiselectFocus},
39+
css: {_active: listVisible},
4040
click: function(data, event) {
4141
toggleListVisible(data, event)
4242
}
@@ -52,7 +52,7 @@
5252
class="action-select admin__action-multiselect"
5353
data-role="advanced-select"
5454
data-bind="
55-
css: {_active: multiselectFocus},
55+
css: {_active: listVisible},
5656
click: function(data, event) {
5757
toggleListVisible(data, event)
5858
}

app/code/Magento/UrlRewrite/Model/StoreSwitcher/RewriteUrl.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,16 @@ public function switch(StoreInterface $fromStore, StoreInterface $targetStore, s
6565
UrlRewrite::STORE_ID => $oldStoreId,
6666
]);
6767
if ($oldRewrite) {
68+
$targetUrl = $targetStore->getBaseUrl();
6869
// look for url rewrite match on the target store
6970
$currentRewrite = $this->urlFinder->findOneByData([
70-
UrlRewrite::REQUEST_PATH => $urlPath,
71+
UrlRewrite::TARGET_PATH => $oldRewrite->getTargetPath(),
7172
UrlRewrite::STORE_ID => $targetStore->getId(),
7273
]);
73-
if (null === $currentRewrite) {
74-
/** @var \Magento\Framework\App\Response\Http $response */
75-
$targetUrl = $targetStore->getBaseUrl();
74+
if ($currentRewrite) {
75+
$targetUrl .= $currentRewrite->getRequestPath();
7676
}
7777
}
78-
7978
return $targetUrl;
8079
}
8180
}

app/design/adminhtml/Magento/backend/Magento_AdminNotification/web/css/source/_module.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484
.message-system-short-wrapper {
8585
overflow: hidden;
86-
padding: 0 1.5rem 0 @indent__l;
86+
padding: 0 1.5rem 0 1rem;
8787
}
8888

8989
.message-system-collapsible {

app/design/adminhtml/Magento/backend/web/css/source/forms/_controls.less

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
cursor: pointer;
8686
}
8787

88-
&:focus {
88+
&:active {
8989
background-image+: url('../images/arrows-bg.svg');
9090
background-position+: ~'calc(100% - 12px)' 13px;
9191

@@ -107,19 +107,6 @@
107107
}
108108
}
109109

110-
// ToDo UI: add month and date styles
111-
// .admin__control-select-month {
112-
// width: 140px;
113-
// }
114-
115-
// .admin__control-select-year {
116-
// width: 103px;
117-
// }
118-
119-
// .admin__control-cvn {
120-
// width: 3em;
121-
// }
122-
123110
option:empty {
124111
display: none;
125112
}
@@ -151,22 +138,24 @@ option:empty {
151138
.admin__control-file-label {
152139
&:before {
153140
&:extend(.abs-form-control-pattern);
154-
155-
content:'';
156-
left: 0;
157-
position: absolute;
158-
top: 0;
159-
width: 100%;
160-
z-index: 0;
161-
162141
.admin__control-file:active + &,
163142
.admin__control-file:focus + & {
143+
/**
144+
* @codingStandardsIgnoreStart
145+
*/
164146
&:extend(.abs-form-control-pattern:focus);
165147
}
166148

167149
.admin__control-file[disabled] + & {
168150
&:extend(.abs-form-control-pattern[disabled]);
169151
}
152+
153+
content: '';
154+
left: 0;
155+
position: absolute;
156+
top: 0;
157+
width: 100%;
158+
z-index: 0;
170159
}
171160
}
172161

app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,8 @@
643643
&.admin__field {
644644
> .admin__field-control {
645645
&:extend(.abs-field-size-small all);
646-
float: left;
647646
position: relative;
647+
display: inline-block;
648648
}
649649
}
650650

app/design/frontend/Magento/blank/Magento_Customer/web/css/source/_module.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,8 @@
451451
.form.password.reset,
452452
.form.send.confirmation,
453453
.form.password.forget,
454-
.form.create.account {
454+
.form.create.account,
455+
.form.form-orders-search {
455456
min-width: 600px;
456457
width: 50%;
457458
}

app/design/frontend/Magento/luma/Magento_CatalogSearch/web/css/source/_module.less

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@
1818
// _____________________________________________
1919

2020
& when (@media-common = true) {
21+
22+
.search {
23+
.fieldset {
24+
.control {
25+
.addon {
26+
input {
27+
flex-basis: auto;
28+
width: 100%;
29+
}
30+
}
31+
}
32+
}
33+
}
34+
2135
.block-search {
2236
margin-bottom: 0;
2337

app/design/frontend/Magento/luma/Magento_Customer/web/css/source/_module.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@
402402
.form.password.reset,
403403
.form.send.confirmation,
404404
.form.password.forget,
405-
.form.create.account {
405+
.form.create.account,
406+
.form.form-orders-search {
406407
min-width: 600px;
407408
width: 50%;
408409
}

0 commit comments

Comments
 (0)