Skip to content

Commit 55be826

Browse files
Merge remote-tracking branch 'mainline/develop' into MAGETWO-62405-SalesRule-Invis-Prods
2 parents 78704b0 + d1b86ae commit 55be826

File tree

27 files changed

+468
-22
lines changed

27 files changed

+468
-22
lines changed

app/code/Magento/Backend/view/adminhtml/templates/admin/login.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
data-validate="{required:true}"
4444
value=""
4545
placeholder="<?php /* @escapeNotVerified */ echo __('password') ?>"
46-
autocomplete="off"
46+
autocomplete="new-password"
4747
/>
4848
</div>
4949
</div>

app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<fieldset class="admin__fieldset password-box-container">
7474
<div class="admin__field field _required">
7575
<label for="password" class="admin__field-label"><span><?php /* @escapeNotVerified */ echo __('User Password')?></span></label>
76-
<div class="admin__field-control"><input type="password" name="password" id="password" class="admin__control-text required-entry" autocomplete="off"></div>
76+
<div class="admin__field-control"><input type="password" name="password" id="password" class="admin__control-text required-entry" autocomplete="new-password"></div>
7777
</div>
7878

7979
<div class="admin__field field maintenance-checkbox-container">
@@ -119,7 +119,7 @@
119119
<span><?php /* @escapeNotVerified */ echo __('FTP Password') ?></span>
120120
</label>
121121
<div class="admin__field-control">
122-
<input type="password" class="admin__control-text" name="ftp_pass" id="ftp_pass" autocomplete="off">
122+
<input type="password" class="admin__control-text" name="ftp_pass" id="ftp_pass" autocomplete="new-password">
123123
</div>
124124
</div>
125125
<div class="admin__field field">

app/code/Magento/Catalog/view/adminhtml/ui_component/design_config_form.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<formElements>
2828
<fileUploader>
2929
<settings>
30-
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
30+
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
3131
<maxFileSize>2097152</maxFileSize>
3232
<uploaderConfig>
3333
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
@@ -87,7 +87,7 @@
8787
<formElements>
8888
<fileUploader>
8989
<settings>
90-
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
90+
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
9191
<maxFileSize>2097152</maxFileSize>
9292
<uploaderConfig>
9393
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
@@ -147,7 +147,7 @@
147147
<formElements>
148148
<fileUploader>
149149
<settings>
150-
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
150+
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
151151
<maxFileSize>2097152</maxFileSize>
152152
<uploaderConfig>
153153
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>

app/code/Magento/Config/Model/Config/Backend/Image/Favicon.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ protected function _addWhetherScopeInfo()
4545
*/
4646
protected function _getAllowedExtensions()
4747
{
48-
return ['ico', 'png', 'gif', 'jpg', 'jpeg', 'apng', 'svg'];
48+
return ['ico', 'png', 'gif', 'jpg', 'jpeg', 'apng'];
4949
}
5050
}

app/code/Magento/Config/Model/Config/Backend/Image/Logo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ protected function _addWhetherScopeInfo()
4545
*/
4646
protected function _getAllowedExtensions()
4747
{
48-
return ['jpg', 'jpeg', 'gif', 'png', 'svg'];
48+
return ['jpg', 'jpeg', 'gif', 'png'];
4949
}
5050
}

app/code/Magento/Config/Test/Unit/Model/Config/Backend/Image/LogoTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function testBeforeSave()
7373
->will($this->returnValue('/tmp/val'));
7474
$this->uploaderMock->expects($this->once())
7575
->method('setAllowedExtensions')
76-
->with($this->equalTo(['jpg', 'jpeg', 'gif', 'png', 'svg']));
76+
->with($this->equalTo(['jpg', 'jpeg', 'gif', 'png']));
7777
$this->model->beforeSave();
7878
}
7979
}

app/code/Magento/Email/view/adminhtml/ui_component/design_config_form.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<formElements>
2323
<fileUploader>
2424
<settings>
25-
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
25+
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
2626
<maxFileSize>2097152</maxFileSize>
2727
<uploaderConfig>
2828
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>

app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,4 +303,26 @@ public function getFormattedAddress(Address $address)
303303
{
304304
return $this->addressRenderer->format($address, 'html');
305305
}
306+
307+
/**
308+
* @inheritdoc
309+
*/
310+
public function getChildHtml($alias = '', $useCache = true)
311+
{
312+
$layout = $this->getLayout();
313+
314+
if ($alias || !$layout) {
315+
return parent::getChildHtml($alias, $useCache);
316+
}
317+
318+
$childNames = $layout->getChildNames($this->getNameInLayout());
319+
$outputChildNames = array_diff($childNames, ['extra_customer_info']);
320+
321+
$out = '';
322+
foreach ($outputChildNames as $childName) {
323+
$out .= $layout->renderElement($childName, $useCache);
324+
}
325+
326+
return $out;
327+
}
306328
}

app/code/Magento/Swatches/view/adminhtml/ui_component/design_config_form.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<formElements>
2323
<fileUploader>
2424
<settings>
25-
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
25+
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
2626
<maxFileSize>2097152</maxFileSize>
2727
<uploaderConfig>
2828
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Tax\Setup;
8+
9+
use Magento\Directory\Model\RegionFactory;
10+
use Magento\Framework\Api\Search\SearchCriteriaFactory;
11+
use Magento\Framework\Setup\InstallDataInterface;
12+
use Magento\Framework\Setup\ModuleContextInterface;
13+
use Magento\Framework\Setup\ModuleDataSetupInterface;
14+
use Magento\Tax\Api\TaxRateRepositoryInterface;
15+
16+
/**
17+
* Update installed tax region codes
18+
*/
19+
class RecurringData implements InstallDataInterface
20+
{
21+
/**
22+
* Tax rate repository
23+
*
24+
* @var TaxRateRepositoryInterface
25+
*/
26+
private $taxRateRepository;
27+
28+
/**
29+
* @var SearchCriteriaFactory
30+
*/
31+
32+
private $searchCriteriaFactory;
33+
34+
/**
35+
* @var RegionFactory
36+
*/
37+
private $directoryRegionFactory;
38+
39+
/**
40+
* Init
41+
*
42+
* @param TaxRateRepositoryInterface $taxRateRepository
43+
* @param SearchCriteriaFactory $searchCriteriaFactory
44+
* @param RegionFactory $directoryRegionFactory
45+
*/
46+
public function __construct(
47+
TaxRateRepositoryInterface $taxRateRepository,
48+
SearchCriteriaFactory $searchCriteriaFactory,
49+
RegionFactory $directoryRegionFactory
50+
) {
51+
$this->taxRateRepository = $taxRateRepository;
52+
$this->searchCriteriaFactory = $searchCriteriaFactory;
53+
$this->directoryRegionFactory = $directoryRegionFactory;
54+
}
55+
56+
/**
57+
* {@inheritdoc}
58+
*/
59+
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
60+
{
61+
$taxRateList = $this->taxRateRepository->getList($this->searchCriteriaFactory->create());
62+
/** @var \Magento\Tax\Api\Data\TaxRateInterface $taxRateData */
63+
foreach ($taxRateList->getItems() as $taxRateData) {
64+
$regionCode = $this->parseRegionFromTaxCode($taxRateData->getCode());
65+
if ($regionCode) {
66+
/** @var \Magento\Directory\Model\Region $region */
67+
$region = $this->directoryRegionFactory->create();
68+
$region->loadByCode($regionCode, $taxRateData->getTaxCountryId());
69+
$taxRateData->setTaxRegionId($region->getRegionId());
70+
$this->taxRateRepository->save($taxRateData);
71+
}
72+
}
73+
}
74+
75+
/**
76+
* Parse region code from tax code
77+
*
78+
* @param string $taxCode
79+
* @return string
80+
*/
81+
private function parseRegionFromTaxCode($taxCode)
82+
{
83+
$result = '';
84+
$parts = explode('-', $taxCode, 3);
85+
86+
if (isset($parts[1])) {
87+
$result = $parts[1];
88+
}
89+
90+
return $result;
91+
}
92+
}

0 commit comments

Comments
 (0)