Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.3-develop' into MC-19242
Browse files Browse the repository at this point in the history
  • Loading branch information
adifucan committed Sep 3, 2019
2 parents 0d29cd0 + b31bb4f commit a241517
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 24 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<section id="advanced" translate="label" type="text" sortOrder="910" showInDefault="0" showInWebsite="0" showInStore="0">
<label>Advanced</label>
<tab>advanced</tab>
<resource>Magento_Backend::advanced</resource>
<resource>Magento_Config::advanced</resource>
<group id="modules_disable_output" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Disable Modules Output</label>
<frontend_model>Magento\Config\Block\System\Config\Form\Fieldset\Modules\DisableOutput</frontend_model>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Main;

use Magento\Backend\Block\Widget\Form;

/**
* Form attribute set
*
* Class \Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Main\Formset
*/
class Formset extends \Magento\Backend\Block\Widget\Form\Generic
{
/**
Expand Down Expand Up @@ -43,7 +50,7 @@ protected function _prepareForm()

/** @var \Magento\Framework\Data\Form $form */
$form = $this->_formFactory->create();
$fieldset = $form->addFieldset('set_name', ['legend' => __('Edit Attribute Set Name')]);
$fieldset = $form->addFieldset('set_name', ['legend' => $this->getAttributeSetLabel()]);
$fieldset->addField(
'attribute_set_name',
'text',
Expand Down Expand Up @@ -84,4 +91,18 @@ protected function _prepareForm()
$form->setOnsubmit('return false;');
$this->setForm($form);
}

/**
* Get Attribute Set Label
*
* @return \Magento\Framework\Phrase
*/
private function getAttributeSetLabel()
{
if ($this->getRequest()->getParam('id', false)) {
return __('Edit Attribute Set Name');
}

return __('Attribute Set Information');
}
}
2 changes: 2 additions & 0 deletions app/code/Magento/Catalog/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -813,3 +813,5 @@ Details,Details
"Edit Category Design","Edit Category Design"
"A total of %1 record(s) haven't been deleted. Please see server logs for more details.","A total of %1 record(s) haven't been deleted. Please see server logs for more details."
"Are you sure you want to delete this category?","Are you sure you want to delete this category?"
"Attribute Set Information","Attribute Set Information"

Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ define([
// trigger global event, so other modules will be able add parameters to redirect url
$('body').trigger('catalogCategoryAddToCartRedirect', eventData);

if (eventData.redirectParameters.length > 0) {
if (eventData.redirectParameters.length > 0 &&
window.location.href.split(/[?#]/)[0] === res.backUrl
) {
parameters = res.backUrl.split('#');
parameters.push(eventData.redirectParameters.join('&'));
res.backUrl = parameters.join('#');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
<see selector="{{StoreFrontRemoveItemModalSection.message}}" userInput="Are you sure you would like to remove this item from the shopping cart?" stepKey="seeDeleteConfirmationMessage"/>
<click selector="{{StoreFrontRemoveItemModalSection.ok}}" stepKey="confirmDelete"/>
<waitForPageLoad stepKey="waitForDeleteToFinish"/>
<click selector="{{CheckoutCartProductSection.RemoveItem}}" stepKey="deleteProductFromCheckoutCart"/>
<dontSeeElement selector="{{CheckoutCartProductSection.RemoveItem}}" stepKey="dontSeeDeleteProductFromCheckoutCart"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
<waitForPageLoad stepKey="WaitForPageLoad3"/>
<see userInput="You have no items in your shopping cart." stepKey="seeNoItemsInShoppingCart"/>
</test>
Expand Down
4 changes: 4 additions & 0 deletions app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ define([
$(document).trigger('ajax:removeFromCart', {
productIds: [productData['product_id']]
});

if (window.location.href.indexOf(this.shoppingCartUrl) === 0) {
window.location.reload();
}
}
},

Expand Down
10 changes: 4 additions & 6 deletions app/code/Magento/Config/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#Config
# Magento_Config module

The Config module is designed to implement system configuration functionality.
It provides mechanisms to add, edit, store and retrieve the configuration data
for each scope (there can be a default scope as well as scopes for each website and store).
It provides mechanisms to add, edit, store and retrieve the configuration data for each scope (there can be a default scope as well as scopes for each website and store).

Modules can add items to be configured on the system configuration page by creating
system.xml files in their etc/adminhtml directories. These system.xml files get merged
to populate the forms in the config page.
Modules can add items to be configured on the system configuration page by creating system.xml files in their etc/adminhtml directories. These system.xml files get merged to populate the forms in the config page.
5 changes: 4 additions & 1 deletion app/code/Magento/Config/etc/acl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
<resource id="Magento_Backend::stores">
<resource id="Magento_Backend::stores_settings">
<resource id="Magento_Config::config" title="Configuration" translate="title" sortOrder="20">
<resource id="Magento_Config::advanced" title="Advanced Section" translate="title" sortOrder="90" />
<!--
@deprecated Magento_Config::advanced section ('Advanced Section') is disabled and is not displayed in the admin panel
-->
<resource id="Magento_Config::advanced" title="Advanced Section" translate="title" sortOrder="90" disabled="true" />
<resource id="Magento_Config::config_admin" title="Advanced Admin Section" translate="title" sortOrder="100" />
<resource id="Magento_Config::config_design" title="Design Section" translate="title" sortOrder="40" />
<resource id="Magento_Config::config_general" title="General Section" translate="title" sortOrder="20" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* See COPYING.txt for license details.
*/
-->
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="product.info.addtocart">
<block name="product.info.addtocart.instantPurchase" class="Magento\InstantPurchase\Block\Button" template="Magento_InstantPurchase::button.phtml" before="-">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<!--<update handle="MAP_price_msrp_item"/>-->
<update handle="msrp_popup"/>
<body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* See COPYING.txt for license details.
*/
-->
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="product.info.media">
<block class="Magento\ProductVideo\Block\Product\View\Gallery" name="product.info.media.video" after="product.info.media.image" template="Magento_ProductVideo::product/view/gallery.phtml"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

declare(strict_types=1);

namespace Magento\Sales\Controller\Adminhtml\Order;

use Magento\Backend\App\Action;
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;

class ReviewPayment extends \Magento\Sales\Controller\Adminhtml\Order
/**
* Class \Magento\Sales\Controller\Adminhtml\Order\ReviewPayment
*/
class ReviewPayment extends \Magento\Sales\Controller\Adminhtml\Order implements HttpGetActionInterface
{
/**
* Authorization level of a basic admin session
Expand All @@ -21,7 +28,7 @@ class ReviewPayment extends \Magento\Sales\Controller\Adminhtml\Order
*
* Either denies or approves a payment that is in "review" state
*
* @return \Magento\Backend\Model\View\Result\Redirect
* @return \Magento\Framework\Controller\Result\Redirect
*/
public function execute()
{
Expand Down Expand Up @@ -50,21 +57,23 @@ public function execute()
}
break;
default:
throw new \Exception(sprintf('Action "%s" is not supported.', $action));
throw new \Magento\Framework\Exception\NotFoundException(
__('Action "%1" is not supported.', $action)
);
}
$this->orderRepository->save($order);
$this->messageManager->addSuccessMessage($message);
$resultRedirect->setPath('sales/order/view', ['order_id' => $order->getEntityId()]);
} else {
$resultRedirect->setPath('sales/*/');
return $resultRedirect;
}
// phpcs:ignore Magento2.Exceptions.ThrowCatch
} catch (\Magento\Framework\Exception\LocalizedException $e) {
$this->messageManager->addErrorMessage($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addErrorMessage(__('We can\'t update the payment right now.'));
$this->logger->critical($e);
$resultRedirect->setPath('sales/*/');
}
$resultRedirect->setPath('sales/order/view', ['order_id' => $order->getEntityId()]);
return $resultRedirect;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
</thead>
<?php $items = $block->getItems(); ?>
<?php $giftMessage = ''?>
<tbody>
<?php foreach ($items as $item) :
if ($item->getParentItem()) :
continue;
endif;
?>
<tbody>
<?= $block->getItemHtml($item) ?>
<?php if ($this->helper(\Magento\GiftMessage\Helper\Message::class)->isMessagesAllowed('order_item', $item) && $item->getGiftMessageId()) : ?>
<?php $giftMessage = $this->helper(\Magento\GiftMessage\Helper\Message::class)->getGiftMessageForEntity($item); ?>
Expand Down Expand Up @@ -65,8 +65,8 @@
</td>
</tr>
<?php endif ?>
</tbody>
<?php endforeach; ?>
</tbody>
<tfoot>
<?php if ($block->isPagerDisplayed()) : ?>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public function __construct(ReadFactory $readFactory, RulePool $rulePool)
*/
public function resolve($type, $file, $area = null, ThemeInterface $theme = null, $locale = null, $module = null)
{

$params = ['area' => $area, 'theme' => $theme, 'locale' => $locale];
foreach ($params as $key => $param) {
if ($param === null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<section id="advanced" translate="label" type="text" sortOrder="910" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Advanced</label>
<tab>advanced</tab>
<resource>Magento_Backend::advanced</resource>
<resource>Magento_Config::advanced</resource>
<group id="modules_disable_output" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Disable Modules Output</label>
<frontend_model>Magento\Config\Block\System\Config\Form\Fieldset\Modules\DisableOutput\Proxy</frontend_model>
Expand Down

0 comments on commit a241517

Please sign in to comment.