Skip to content

Commit

Permalink
MAGETWO-69733: Merge branch 'develop' of github.com:magento/magento2c…
Browse files Browse the repository at this point in the history
…e into MAGETWO-69733-PR-8879
  • Loading branch information
ishakhsuvarov committed Jun 13, 2017
2 parents 2fa5c75 + 0aa7656 commit d09f112
Show file tree
Hide file tree
Showing 38 changed files with 546 additions and 107 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
16 changes: 8 additions & 8 deletions app/code/Magento/CatalogImportExport/Model/Import/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -1228,15 +1228,15 @@ protected function _saveLinks()
'linked_product_id' => $linkedId,
'link_type_id' => $linkId,
];
if (!empty($linkPositions[$linkedKey])) {
$positionRows[] = [
'link_id' => $productLinkKeys[$linkKey],
'product_link_attribute_id' => $positionAttrId[$linkId],
'value' => $linkPositions[$linkedKey],
];
}
$nextLinkId++;
}
if (!empty($linkPositions[$linkedKey])) {
$positionRows[] = [
'link_id' => $productLinkKeys[$linkKey],
'product_link_attribute_id' => $positionAttrId[$linkId],
'value' => $linkPositions[$linkedKey],
];
}
$nextLinkId++;
}
}
}
Expand Down
56 changes: 48 additions & 8 deletions app/code/Magento/Checkout/view/frontend/web/js/checkout-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ define([

if ($.isEmptyObject(data)) {
data = {
'selectedShippingAddress': null,
'shippingAddressFromData': null,
'newCustomerShippingAddress': null,
'selectedShippingRate': null,
'selectedPaymentMethod': null,
'selectedBillingAddress': null,
'billingAddressFormData': null,
'newCustomerBillingAddress': null
'selectedShippingAddress': null, //Selected shipping address pulled from persistence storage
'shippingAddressFromData': null, //Shipping address pulled from persistence storage
'newCustomerShippingAddress': null, //Shipping address pulled from persistence storage for customer
'selectedShippingRate': null, //Shipping rate pulled from persistence storage
'selectedPaymentMethod': null, //Payment method pulled from persistence storage
'selectedBillingAddress': null, //Selected billing address pulled from persistence storage
'billingAddressFromData': null, //Billing address pulled from persistence storage
'newCustomerBillingAddress': null //Billing address pulled from persistence storage for new customer
};
saveData(data);
}
Expand All @@ -48,6 +48,8 @@ define([

return {
/**
* Setting the selected shipping address pulled from persistence storage
*
* @param {Object} data
*/
setSelectedShippingAddress: function (data) {
Expand All @@ -58,13 +60,17 @@ define([
},

/**
* Pulling the selected shipping address from persistence storage
*
* @return {*}
*/
getSelectedShippingAddress: function () {
return getData().selectedShippingAddress;
},

/**
* Setting the shipping address pulled from persistence storage
*
* @param {Object} data
*/
setShippingAddressFromData: function (data) {
Expand All @@ -75,13 +81,17 @@ define([
},

/**
* Pulling the shipping address from persistence storage
*
* @return {*}
*/
getShippingAddressFromData: function () {
return getData().shippingAddressFromData;
},

/**
* Setting the shipping address pulled from persistence storage for new customer
*
* @param {Object} data
*/
setNewCustomerShippingAddress: function (data) {
Expand All @@ -92,13 +102,17 @@ define([
},

/**
* Pulling the shipping address from persistence storage for new customer
*
* @return {*}
*/
getNewCustomerShippingAddress: function () {
return getData().newCustomerShippingAddress;
},

/**
* Setting the selected shipping rate pulled from persistence storage
*
* @param {Object} data
*/
setSelectedShippingRate: function (data) {
Expand All @@ -109,13 +123,17 @@ define([
},

/**
* Pulling the selected shipping rate from local storage
*
* @return {*}
*/
getSelectedShippingRate: function () {
return getData().selectedShippingRate;
},

/**
* Setting the selected payment method pulled from persistence storage
*
* @param {Object} data
*/
setSelectedPaymentMethod: function (data) {
Expand All @@ -126,13 +144,17 @@ define([
},

/**
* Pulling the payment method from persistence storage
*
* @return {*}
*/
getSelectedPaymentMethod: function () {
return getData().selectedPaymentMethod;
},

/**
* Setting the selected billing address pulled from persistence storage
*
* @param {Object} data
*/
setSelectedBillingAddress: function (data) {
Expand All @@ -143,13 +165,17 @@ define([
},

/**
* Pulling the selected billing address from persistence storage
*
* @return {*}
*/
getSelectedBillingAddress: function () {
return getData().selectedBillingAddress;
},

/**
* Setting the billing address pulled from persistence storage
*
* @param {Object} data
*/
setBillingAddressFromData: function (data) {
Expand All @@ -160,13 +186,17 @@ define([
},

/**
* Pulling the billing address from persistence storage
*
* @return {*}
*/
getBillingAddressFromData: function () {
return getData().billingAddressFromData;
},

/**
* Setting the billing address pulled from persistence storage for new customer
*
* @param {Object} data
*/
setNewCustomerBillingAddress: function (data) {
Expand All @@ -177,13 +207,17 @@ define([
},

/**
* Pulling the billing address from persistence storage for new customer
*
* @return {*}
*/
getNewCustomerBillingAddress: function () {
return getData().newCustomerBillingAddress;
},

/**
* Pulling the email address from persistence storage
*
* @return {*}
*/
getValidatedEmailValue: function () {
Expand All @@ -193,6 +227,8 @@ define([
},

/**
* Setting the email address pulled from persistence storage
*
* @param {String} email
*/
setValidatedEmailValue: function (email) {
Expand All @@ -203,6 +239,8 @@ define([
},

/**
* Pulling the email input field value from persistence storage
*
* @return {*}
*/
getInputFieldEmailValue: function () {
Expand All @@ -212,6 +250,8 @@ define([
},

/**
* Setting the email input field value pulled from persistence storage
*
* @param {String} email
*/
setInputFieldEmailValue: function (email) {
Expand Down
17 changes: 1 addition & 16 deletions app/code/Magento/Cms/Model/BlockRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,25 +154,10 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $criteria

$this->collectionProcessor->process($criteria, $collection);

$blocks = [];
/** @var Block $blockModel */
foreach ($collection as $blockModel) {
$blockData = $this->dataBlockFactory->create();
$this->dataObjectHelper->populateWithArray(
$blockData,
$blockModel->getData(),
\Magento\Cms\Api\Data\BlockInterface::class
);
$blocks[] = $this->dataObjectProcessor->buildOutputDataArray(
$blockData,
\Magento\Cms\Api\Data\BlockInterface::class
);
}

/** @var Data\BlockSearchResultsInterface $searchResults */
$searchResults = $this->searchResultsFactory->create();
$searchResults->setSearchCriteria($criteria);
$searchResults->setItems($blocks);
$searchResults->setItems($collection->getItems());
$searchResults->setTotalCount($collection->getSize());
return $searchResults;
}
Expand Down
17 changes: 1 addition & 16 deletions app/code/Magento/Cms/Model/PageRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,25 +157,10 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $criteria

$this->collectionProcessor->process($criteria, $collection);

$pages = [];
/** @var Page $pageModel */
foreach ($collection as $pageModel) {
$pageData = $this->dataPageFactory->create();
$this->dataObjectHelper->populateWithArray(
$pageData,
$pageModel->getData(),
\Magento\Cms\Api\Data\PageInterface::class
);
$pages[] = $this->dataObjectProcessor->buildOutputDataArray(
$pageData,
\Magento\Cms\Api\Data\PageInterface::class
);
}

/** @var Data\PageSearchResultsInterface $searchResults */
$searchResults = $this->searchResultsFactory->create();
$searchResults->setSearchCriteria($criteria);
$searchResults->setItems($pages);
$searchResults->setItems($collection->getItems());
$searchResults->setTotalCount($collection->getSize());
return $searchResults;
}
Expand Down
16 changes: 1 addition & 15 deletions app/code/Magento/Cms/Test/Unit/Model/BlockRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,22 +263,8 @@ public function testGetList()
->willReturnSelf();
$this->blockSearchResult->expects($this->once())
->method('setItems')
->with(['someData'])
->with([$this->block])
->willReturnSelf();

$this->block->expects($this->once())
->method('getData')
->willReturn(['data']);

$this->dataHelper->expects($this->once())
->method('populateWithArray')
->with($this->blockData, ['data'], \Magento\Cms\Api\Data\BlockInterface::class);

$this->dataObjectProcessor->expects($this->once())
->method('buildOutputDataArray')
->with($this->blockData, \Magento\Cms\Api\Data\BlockInterface::class)
->willReturn('someData');

$this->assertEquals($this->blockSearchResult, $this->repository->getList($criteria));
}
}
16 changes: 1 addition & 15 deletions app/code/Magento/Cms/Test/Unit/Model/PageRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,22 +261,8 @@ public function testGetList()
->willReturnSelf();
$this->pageSearchResult->expects($this->once())
->method('setItems')
->with(['someData'])
->with([$this->page])
->willReturnSelf();

$this->page->expects($this->once())
->method('getData')
->willReturn(['data']);

$this->dataHelper->expects($this->once())
->method('populateWithArray')
->with($this->pageData, ['data'], \Magento\Cms\Api\Data\PageInterface::class);

$this->dataObjectProcessor->expects($this->once())
->method('buildOutputDataArray')
->with($this->pageData, \Magento\Cms\Api\Data\PageInterface::class)
->willReturn('someData');

$this->assertEquals($this->pageSearchResult, $this->repository->getList($criteria));
}
}
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'];
}
}
Loading

0 comments on commit d09f112

Please sign in to comment.