Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.3-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - #14868: [Forwardport] Fix issue #13944. Show Store Views in Terms and Conditions grid. (by @rostyslav-hymon)
 - #14867: [forwardport] PR#12712 : Found 2 elements with non-unique id #email (by @julienanquetil)
 - magento-engcom-team/magento2ce#114: [2.3-develop] Forwardport of #11539 (by @magento-engcom-team)
 - #14382: Removed unused translation for comment tag (by @yogeshks)


Fixed GitHub Issues:
 - #13944: Stores -> Terms and Conditions - No Store View shown (reported by @raymond62) has been fixed in #14868 by @rostyslav-hymon in 2.3-develop branch
   Related commits:
     1. 9000f74

 - #12712: Latest Google Chrome Browser issue with duplicate #email (reported by @lano-vargas) has been fixed in #14867 by @julienanquetil in 2.3-develop branch
   Related commits:
     1. b7c0f1b

 - #14850: Found 2 elements with non-unique id #email: magento 2 contact (reported by @shivkumarsingh7) has been fixed in #14867 by @julienanquetil in 2.3-develop branch
   Related commits:
     1. b7c0f1b

 - #9360: <depends> field doesn't work in system.xml for "radios" fields (reported by @WaPoNe) has been fixed in magento-engcom-team/magento2ce#114 by @magento-engcom-team in 2.3-develop branch
   Related commits:
     1. da5692c
     2. 9775cd8
     3. e10a3ff
  • Loading branch information
magento-engcom-team authored Apr 28, 2018
2 parents aced6fc + 04d756b commit 910ca33
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 32 deletions.
4 changes: 2 additions & 2 deletions app/code/Magento/Analytics/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
Your reports can be accessed securely on a personalized dashboard outside of the admin panel by clicking on the
"Go to Advanced Reporting" link. </br> For more information, see our <a href="https://magento.com/legal/terms/cloud-terms">
terms and conditions</a>.]]></comment>
<field id="enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
<field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Advanced Reporting Service</label>
<source_model>Magento\Config\Model\Config\Source\Enabledisable</source_model>
<backend_model>Magento\Analytics\Model\Config\Backend\Enabled</backend_model>
<frontend_model>Magento\Analytics\Block\Adminhtml\System\Config\SubscriptionStatusLabel</frontend_model>
<config_path>analytics/subscription/enabled</config_path>
</field>
<field id="collection_time" translate="label comment" type="time" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
<field id="collection_time" translate="label" type="time" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Time of day to send data</label>
<frontend_model>Magento\Analytics\Block\Adminhtml\System\Config\CollectionTimeLabel</frontend_model>
<backend_model>Magento\Analytics\Model\Config\Backend\CollectionTime</backend_model>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,33 +184,19 @@ protected function _prepareForm()
'form_after',
$this->getLayout()->createBlock(
\Magento\Backend\Block\Widget\Form\Element\Dependence::class
)->addFieldMap(
"is_wysiwyg_enabled",
'wysiwyg_enabled'
)->addFieldMap(
"is_html_allowed_on_front",
'html_allowed_on_front'
)->addFieldMap(
"frontend_input",
'frontend_input_type'
)->addFieldDependence(
'wysiwyg_enabled',
'frontend_input_type',
'textarea'
)->addFieldDependence(
'html_allowed_on_front',
'wysiwyg_enabled',
'0'
)
->addFieldMap(
)->addFieldMap(
"is_searchable",
'searchable'
)
->addFieldMap(
)->addFieldMap(
"is_visible_in_advanced_search",
'advanced_search'
)
->addFieldDependence(
)->addFieldDependence(
'advanced_search',
'searchable',
'1'
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Catalog/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
</group>
<group id="recently_products" translate="label" type="text" sortOrder="350" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Recently Viewed/Compared Products</label>
<field id="recently_viewed_lifetime" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
<field id="recently_viewed_lifetime" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
<label>Lifetime of products in Recently Viewed Widget</label>
</field>
<field id="recently_compared_lifetime" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
<field id="recently_compared_lifetime" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
<label>Lifetime of products in Recently Compared Widget</label>
</field>
<field id="synchronize_with_backend" translate="label" type="select" showInDefault="1" canRestore="1">
Expand Down Expand Up @@ -83,7 +83,7 @@
<backend_model>Magento\Catalog\Model\Indexer\Product\Flat\System\Config\Mode</backend_model>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="default_sort_by" translate="label comment" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<field id="default_sort_by" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Product Listing Sort by</label>
<source_model>Magento\Catalog\Model\Config\Source\ListSort</source_model>
</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,42 @@
*/
namespace Magento\CheckoutAgreements\Block\Adminhtml\Agreement;

use Magento\Framework\App\ObjectManager;
use Magento\CheckoutAgreements\Model\ResourceModel\Agreement\Grid\CollectionFactory as GridCollectionFactory;

class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
{
/**
* @var \Magento\CheckoutAgreements\Model\ResourceModel\Agreement\CollectionFactory
* @deprecated
*/
protected $_collectionFactory;

/**
* @param GridCollectionFactory
*/
private $gridCollectionFactory;

/**
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Backend\Helper\Data $backendHelper
* @param \Magento\CheckoutAgreements\Model\ResourceModel\Agreement\CollectionFactory $collectionFactory
* @param array $data
* @param GridCollectionFactory $gridColFactory
* @codeCoverageIgnore
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Backend\Helper\Data $backendHelper,
\Magento\CheckoutAgreements\Model\ResourceModel\Agreement\CollectionFactory $collectionFactory,
array $data = []
array $data = [],
GridCollectionFactory $gridColFactory = null
) {

$this->_collectionFactory = $collectionFactory;
$this->gridCollectionFactory = $gridColFactory
? : ObjectManager::getInstance()->get(GridCollectionFactory::class);

parent::__construct($context, $backendHelper, $data);
}

Expand All @@ -47,7 +62,7 @@ protected function _construct()
*/
protected function _prepareCollection()
{
$this->setCollection($this->_collectionFactory->create());
$this->setCollection($this->gridCollectionFactory->create());
return parent::_prepareCollection();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\CheckoutAgreements\Model\ResourceModel\Agreement\Grid;

/**
* CheckoutAgreement Grid Collection
*/
class Collection extends \Magento\CheckoutAgreements\Model\ResourceModel\Agreement\Collection
{

/**
* {@inheritdoc}
*/
public function load($printQuery = false, $logQuery = false)
{
if ($this->isLoaded()) {
return $this;
}

parent::load($printQuery, $logQuery);

$this->addStoresToResult();

return $this;
}

/**
* @return void
*/
private function addStoresToResult()
{
$stores = $this->getStoresForAgreements();

if (!empty($stores)) {
$storesByAgreementId = [];

foreach ($stores as $storeData) {
$storesByAgreementId[$storeData['agreement_id']][] = $storeData['store_id'];
}

foreach ($this as $item) {
$agreementId = $item->getData('agreement_id');

if (!isset($storesByAgreementId[$agreementId])) {
continue;
}

$item->setData('stores', $storesByAgreementId[$agreementId]);
}
}
}

/**
* @return array
*/
private function getStoresForAgreements()
{
$agreementId = $this->getColumnValues('agreement_id');

if (!empty($agreementId)) {
$select = $this->getConnection()->select()->from(
['agreement_store' => 'checkout_agreement_store']
)->where(
'agreement_store.agreement_id IN (?)',
$agreementId
);

return $this->getConnection()->fetchAll($select);
}

return [];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
id="login-form">
<div class="fieldset login" data-bind="attr: {'data-hasrequired': $t('* Required Fields')}">
<div class="field email required">
<label class="label" for="email"><span data-bind="i18n: 'Email Address'"></span></label>
<label class="label" for="customer-email"><span data-bind="i18n: 'Email Address'"></span></label>
<div class="control">
<input name="username"
id="email"
id="customer-email"
type="email"
class="input-text"
data-bind="attr: {autocomplete: autocomplete}"
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Sales/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@
<comment>We'll use the default error above if you leave this empty.</comment>
</field>
</group>
<group id="dashboard" translate="label comment" sortOrder="60" showInDefault="1" showInWebsite="0" showInStore="0">
<group id="dashboard" translate="label" sortOrder="60" showInDefault="1" showInWebsite="0" showInStore="0">
<label>Dashboard</label>
<field id="use_aggregated_data" translate="label" sortOrder="10" type="select" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
<field id="use_aggregated_data" translate="label comment" sortOrder="10" type="select" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
<label>Use Aggregated Data</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<comment>Improves dashboard performance but provides non-realtime data.</comment>
</field>
</group>
<group id="orders" translate="label comment" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0">
<group id="orders" translate="label" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Orders Cron Settings</label>
<field id="delete_pending_after" translate="label" type="text" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Pending Payment Order Lifetime (minutes)</label>
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Swatches/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<system>
<section id="catalog" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<group id="frontend" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
<field id="swatches_per_product" translate="label comment" type="text" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<field id="swatches_per_product" translate="label" type="text" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Swatches per Product</label>
</field>
<field id="show_swatches_in_product_list" translate="label comment" type="select" sortOrder="310" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<field id="show_swatches_in_product_list" translate="label" type="select" sortOrder="310" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Show Swatches in Product List</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Ups/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<label>Live Account</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="unit_of_measure" translate="label comment" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<field id="unit_of_measure" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Weight Unit</label>
<source_model>Magento\Ups\Model\Config\Source\Unitofmeasure</source_model>
</field>
Expand Down

0 comments on commit 910ca33

Please sign in to comment.