Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:magento/magento2ce into MAGETWO-…
Browse files Browse the repository at this point in the history
…67087
  • Loading branch information
slopukhov committed Jun 12, 2017
2 parents 43a0268 + d1b86ae commit ed38305
Show file tree
Hide file tree
Showing 27 changed files with 468 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
data-validate="{required:true}"
value=""
placeholder="<?php /* @escapeNotVerified */ echo __('password') ?>"
autocomplete="off"
autocomplete="new-password"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<fieldset class="admin__fieldset password-box-container">
<div class="admin__field field _required">
<label for="password" class="admin__field-label"><span><?php /* @escapeNotVerified */ echo __('User Password')?></span></label>
<div class="admin__field-control"><input type="password" name="password" id="password" class="admin__control-text required-entry" autocomplete="off"></div>
<div class="admin__field-control"><input type="password" name="password" id="password" class="admin__control-text required-entry" autocomplete="new-password"></div>
</div>

<div class="admin__field field maintenance-checkbox-container">
Expand Down Expand Up @@ -119,7 +119,7 @@
<span><?php /* @escapeNotVerified */ echo __('FTP Password') ?></span>
</label>
<div class="admin__field-control">
<input type="password" class="admin__control-text" name="ftp_pass" id="ftp_pass" autocomplete="off">
<input type="password" class="admin__control-text" name="ftp_pass" id="ftp_pass" autocomplete="new-password">
</div>
</div>
<div class="admin__field field">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<formElements>
<fileUploader>
<settings>
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
Expand Down Expand Up @@ -87,7 +87,7 @@
<formElements>
<fileUploader>
<settings>
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
Expand Down Expand Up @@ -147,7 +147,7 @@
<formElements>
<fileUploader>
<settings>
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ protected function _addWhetherScopeInfo()
*/
protected function _getAllowedExtensions()
{
return ['ico', 'png', 'gif', 'jpg', 'jpeg', 'apng', 'svg'];
return ['ico', 'png', 'gif', 'jpg', 'jpeg', 'apng'];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ protected function _addWhetherScopeInfo()
*/
protected function _getAllowedExtensions()
{
return ['jpg', 'jpeg', 'gif', 'png', 'svg'];
return ['jpg', 'jpeg', 'gif', 'png'];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function testBeforeSave()
->will($this->returnValue('/tmp/val'));
$this->uploaderMock->expects($this->once())
->method('setAllowedExtensions')
->with($this->equalTo(['jpg', 'jpeg', 'gif', 'png', 'svg']));
->with($this->equalTo(['jpg', 'jpeg', 'gif', 'png']));
$this->model->beforeSave();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<formElements>
<fileUploader>
<settings>
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
Expand Down
22 changes: 22 additions & 0 deletions app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,26 @@ public function getFormattedAddress(Address $address)
{
return $this->addressRenderer->format($address, 'html');
}

/**
* @inheritdoc
*/
public function getChildHtml($alias = '', $useCache = true)
{
$layout = $this->getLayout();

if ($alias || !$layout) {
return parent::getChildHtml($alias, $useCache);
}

$childNames = $layout->getChildNames($this->getNameInLayout());
$outputChildNames = array_diff($childNames, ['extra_customer_info']);

$out = '';
foreach ($outputChildNames as $childName) {
$out .= $layout->renderElement($childName, $useCache);
}

return $out;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<formElements>
<fileUploader>
<settings>
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
Expand Down
92 changes: 92 additions & 0 deletions app/code/Magento/Tax/Setup/RecurringData.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Tax\Setup;

use Magento\Directory\Model\RegionFactory;
use Magento\Framework\Api\Search\SearchCriteriaFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Tax\Api\TaxRateRepositoryInterface;

/**
* Update installed tax region codes
*/
class RecurringData implements InstallDataInterface
{
/**
* Tax rate repository
*
* @var TaxRateRepositoryInterface
*/
private $taxRateRepository;

/**
* @var SearchCriteriaFactory
*/

private $searchCriteriaFactory;

/**
* @var RegionFactory
*/
private $directoryRegionFactory;

/**
* Init
*
* @param TaxRateRepositoryInterface $taxRateRepository
* @param SearchCriteriaFactory $searchCriteriaFactory
* @param RegionFactory $directoryRegionFactory
*/
public function __construct(
TaxRateRepositoryInterface $taxRateRepository,
SearchCriteriaFactory $searchCriteriaFactory,
RegionFactory $directoryRegionFactory
) {
$this->taxRateRepository = $taxRateRepository;
$this->searchCriteriaFactory = $searchCriteriaFactory;
$this->directoryRegionFactory = $directoryRegionFactory;
}

/**
* {@inheritdoc}
*/
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
$taxRateList = $this->taxRateRepository->getList($this->searchCriteriaFactory->create());
/** @var \Magento\Tax\Api\Data\TaxRateInterface $taxRateData */
foreach ($taxRateList->getItems() as $taxRateData) {
$regionCode = $this->parseRegionFromTaxCode($taxRateData->getCode());
if ($regionCode) {
/** @var \Magento\Directory\Model\Region $region */
$region = $this->directoryRegionFactory->create();
$region->loadByCode($regionCode, $taxRateData->getTaxCountryId());
$taxRateData->setTaxRegionId($region->getRegionId());
$this->taxRateRepository->save($taxRateData);
}
}
}

/**
* Parse region code from tax code
*
* @param string $taxCode
* @return string
*/
private function parseRegionFromTaxCode($taxCode)
{
$result = '';
$parts = explode('-', $taxCode, 3);

if (isset($parts[1])) {
$result = $parts[1];
}

return $result;
}
}
2 changes: 1 addition & 1 deletion app/code/Magento/Theme/Model/Design/Backend/Favicon.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ protected function _addWhetherScopeInfo()
*/
public function getAllowedExtensions()
{
return ['ico', 'png', 'gif', 'jpg', 'jpeg', 'apng', 'svg'];
return ['ico', 'png', 'gif', 'jpg', 'jpeg', 'apng'];
}
}
2 changes: 1 addition & 1 deletion app/code/Magento/Theme/Model/Design/Backend/Logo.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ protected function _addWhetherScopeInfo()
*/
public function getAllowedExtensions()
{
return ['jpg', 'jpeg', 'gif', 'png', 'svg'];
return ['jpg', 'jpeg', 'gif', 'png'];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@
</settings>
<field name="head_shortcut_icon" formElement="fileUploader">
<settings>
<notice translate="true">Allowed file types: ico, png, gif, jpg, jpeg, apng, svg. Not all browsers support all these formats!</notice>
<notice translate="true">Allowed file types: ico, png, gif, jpg, jpeg, apng. Not all browsers support all these formats!</notice>
<label translate="true">Favicon Icon</label>
<componentType>fileUploader</componentType>
</settings>
<formElements>
<fileUploader>
<settings>
<allowedExtensions>jpg jpeg gif png svg ico apng</allowedExtensions>
<allowedExtensions>jpg jpeg gif png ico apng</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
Expand Down Expand Up @@ -153,14 +153,14 @@
</settings>
<field name="header_logo_src" formElement="fileUploader">
<settings>
<notice translate="true">Allowed file types: png, gif, jpg, jpeg, svg.</notice>
<notice translate="true">Allowed file types: png, gif, jpg, jpeg.</notice>
<label translate="true">Logo Image</label>
<componentType>fileUploader</componentType>
</settings>
<formElements>
<fileUploader>
<settings>
<allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
<allowedExtensions>jpg jpeg gif png</allowedExtensions>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
Expand Down
Loading

0 comments on commit ed38305

Please sign in to comment.