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:
 - #17293: Fixed a couple of typos (by @dverkade)
 - #17209: [Forwardport] Resolved : Mobile device style groups incorrect order (by @torhoehn)
 - #17201: [Forwardport] Update template.js (by @mage2pratik)
 - #17206: [Forwardport] Remove spaces around amount span. (by @torhoehn)
 - #17198: [Forwardport] Disable autocomplete for captcha inputs (by @mage2pratik)
 - #17228: Fix minor css issues (by @arnoudhgz)
 - #17266: [Forwardport] Replaced deprecated methods. (by @mageprince)


Fixed GitHub Issues:
 - #14476: Mobile device style groups incorrect order in _responsive.less (reported by @damiandawber) has been fixed in #17209 by @torhoehn in 2.3-develop branch
   Related commits:
     1. 647f2fa
  • Loading branch information
magento-engcom-team authored Aug 1, 2018
2 parents 48f1e41 + a6efa4b commit f0c4347
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $captcha = $block->getCaptchaModel();
<div class="field captcha required" role="<?= $block->escapeHtmlAttr($block->getFormId()) ?>">
<label for="captcha_<?= $block->escapeHtmlAttr($block->getFormId()) ?>" class="label"><span><?= $block->escapeHtml(__('Please type the letters and numbers below')) ?></span></label>
<div class="control captcha">
<input name="<?= $block->escapeHtmlAttr(\Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE) ?>[<?= $block->escapeHtmlAttr($block->getFormId()) ?>]" type="text" class="input-text required-entry" data-validate="{required:true}" id="captcha_<?= $block->escapeHtmlAttr($block->getFormId()) ?>" />
<input name="<?= $block->escapeHtmlAttr(\Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE) ?>[<?= $block->escapeHtmlAttr($block->getFormId()) ?>]" type="text" class="input-text required-entry" data-validate="{required:true}" id="captcha_<?= $block->escapeHtmlAttr($block->getFormId()) ?>" autocomplete="off"/>
<div class="nested">
<div class="field captcha no-label"
data-captcha="<?= $block->escapeHtmlAttr($block->getFormId()) ?>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="field captcha required" data-bind="blockLoader: getIsLoading()">
<label data-bind="attr: {for: 'captcha_' + formId}" class="label"><span data-bind="i18n: 'Please type the letters and numbers below'"></span></label>
<div class="control captcha">
<input name="captcha_string" type="text" class="input-text required-entry" data-bind="value: captchaValue(), attr: {id: 'captcha_' + formId, 'data-scope': dataScope}" />
<input name="captcha_string" type="text" class="input-text required-entry" data-bind="value: captchaValue(), attr: {id: 'captcha_' + formId, 'data-scope': dataScope}" autocomplete="off"/>
<input name="captcha_form_id" type="hidden" data-bind="value: formId, attr: {'data-scope': dataScope}" />
<div class="nested">
<div class="field captcha no-label">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
<?= ($block->getPriceDisplayLabel()) ? 'data-label="' . $block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes() . '"' : '' ?>
data-price-amount="<?= /* @escapeNotVerified */ $block->getDisplayValue() ?>"
data-price-type="<?= /* @escapeNotVerified */ $block->getPriceType() ?>"
class="price-wrapper <?= /* @escapeNotVerified */ $block->getPriceWrapperCss() ?>">
<?= /* @escapeNotVerified */ $block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()) ?>
</span>
class="price-wrapper <?= /* @escapeNotVerified */ $block->getPriceWrapperCss() ?>"
><?= /* @escapeNotVerified */ $block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()) ?></span>
<?php if ($block->hasAdjustmentsHtml()): ?>
<?= $block->getAdjustmentsHtml() ?>
<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ public function execute()
$ruleJob->applyAll();

if ($ruleJob->hasSuccess()) {
$this->messageManager->addSuccess($ruleJob->getSuccess());
$this->messageManager->addSuccessMessage($ruleJob->getSuccess());
$this->_objectManager->create(\Magento\CatalogRule\Model\Flag::class)->loadSelf()->setState(0)->save();
} elseif ($ruleJob->hasError()) {
$this->messageManager->addError($errorMessage . ' ' . $ruleJob->getError());
$this->messageManager->addErrorMessage($errorMessage . ' ' . $ruleJob->getError());
}
} catch (\Exception $e) {
$this->_objectManager->create(\Psr\Log\LoggerInterface::class)->critical($e);
$this->messageManager->addError($errorMessage);
$this->messageManager->addErrorMessage($errorMessage);
}

/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ public function execute()
$ruleRepository->deleteById($id);

$this->_objectManager->create(\Magento\CatalogRule\Model\Flag::class)->loadSelf()->setState(1)->save();
$this->messageManager->addSuccess(__('You deleted the rule.'));
$this->messageManager->addSuccessMessage(__('You deleted the rule.'));
$this->_redirect('catalog_rule/*/');
return;
} catch (LocalizedException $e) {
$this->messageManager->addError($e->getMessage());
$this->messageManager->addErrorMessage($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addError(
$this->messageManager->addErrorMessage(
__('We can\'t delete this rule right now. Please review the log and try again.')
);
$this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);
$this->_redirect('catalog_rule/*/edit', ['id' => $this->getRequest()->getParam('id')]);
return;
}
}
$this->messageManager->addError(__('We can\'t find a rule to delete.'));
$this->messageManager->addErrorMessage(__('We can\'t find a rule to delete.'));
$this->_redirect('catalog_rule/*/');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function execute()
try {
$model = $ruleRepository->get($id);
} catch (\Magento\Framework\Exception\NoSuchEntityException $exception) {
$this->messageManager->addError(__('This rule no longer exists.'));
$this->messageManager->addErrorMessage(__('This rule no longer exists.'));
$this->_redirect('catalog_rule/*');
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function execute()
$validateResult = $model->validateData(new \Magento\Framework\DataObject($data));
if ($validateResult !== true) {
foreach ($validateResult as $errorMessage) {
$this->messageManager->addError($errorMessage);
$this->messageManager->addErrorMessage($errorMessage);
}
$this->_getSession()->setPageData($data);
$this->dataPersistor->set('catalog_rule', $data);
Expand All @@ -88,7 +88,7 @@ public function execute()

$ruleRepository->save($model);

$this->messageManager->addSuccess(__('You saved the rule.'));
$this->messageManager->addSuccessMessage(__('You saved the rule.'));
$this->_objectManager->get(\Magento\Backend\Model\Session::class)->setPageData(false);
$this->dataPersistor->clear('catalog_rule');

Expand All @@ -111,9 +111,9 @@ public function execute()
}
return;
} catch (LocalizedException $e) {
$this->messageManager->addError($e->getMessage());
$this->messageManager->addErrorMessage($e->getMessage());
} catch (\Exception $e) {
$this->messageManager->addError(
$this->messageManager->addErrorMessage(
__('Something went wrong while saving the rule data. Please review the error log.')
);
$this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected function checkCatalogRulesAvailability($attributeCode)

if ($disabledRulesCount) {
$this->ruleProductProcessor->markIndexerAsInvalid();
$this->messageManager->addWarning(
$this->messageManager->addWarningMessage(
__(
'You disabled %1 Catalog Price Rules based on "%2" attribute.',
$disabledRulesCount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ define([
* Returns identifier of a record.
*
* @param {*} id - Id of a record or its' index in a rows array.
* @param {Boolean} [isIndex=false] - Flag that specifies whith what
* @param {Boolean} [isIndex=false] - Flag that specifies with what
* kind of identifier we are dealing with.
* @returns {*}
*/
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Ui/view/base/web/js/grid/filters/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ define([
/**
* Creates filter component configuration associated with the provided column.
*
* @param {Column} column - Column component whith a basic filter declaration.
* @param {Column} column - Column component with a basic filter declaration.
* @returns {Object} Filters' configuration.
*/
buildFilter: function (column) {
Expand Down Expand Up @@ -331,7 +331,7 @@ define([
},

/**
* Finds filters whith a not empty data
* Finds filters with a not empty data
* and sets them to the 'active' filters array.
*
* @returns {Filters} Chainable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function testSave()
* @expectedExceptionMessage No such entity with taxRuleId = 9999
* @magentoDbIsolation enabled
*/
public function testSaveThrowsExceptionIdTargetTaxRulDoesNotExist()
public function testSaveThrowsExceptionIdIfTargetTaxRuleDoesNotExist()
{
$taxRuleDataObject = $this->taxRuleFactory->create();
$taxRuleDataObject->setId(9999)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
body {background: url(body.gif);}
@import url(../recursive.css);
p {background: url(1.gif?param);}
@import url("deep/recursive.css");
body {background: url(body.gif);}
p {background: url(1.gif?param);}
h1 {background: url('../h1.gif#param');} h2 {background: url(../images/h2.gif?test);}
4 changes: 2 additions & 2 deletions lib/web/css/docs/docs.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions lib/web/css/source/lib/_responsive.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@

& when (@media-target = 'mobile'), (@media-target = 'all') {

@media only screen and (max-width: (@screen__xxs - 1)) {
.media-width('max', @screen__xxs);
@media only screen and (max-width: @screen__m) {
.media-width('max', (@screen__m + 1));
}

@media only screen and (max-width: (@screen__xs - 1)) {
.media-width('max', @screen__xs);
@media only screen and (max-width: (@screen__m - 1)) {
.media-width('max', @screen__m);
}

@media only screen and (max-width: (@screen__s - 1)) {
.media-width('max', @screen__s);
}

@media only screen and (max-width: (@screen__m - 1)) {
.media-width('max', @screen__m);
@media only screen and (max-width: (@screen__xs - 1)) {
.media-width('max', @screen__xs);
}

@media only screen and (max-width: @screen__m) {
.media-width('max', (@screen__m + 1));
@media only screen and (max-width: (@screen__xxs - 1)) {
.media-width('max', @screen__xxs);
}

@media all and (min-width: @screen__s) {
Expand Down
7 changes: 5 additions & 2 deletions lib/web/mage/utils/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

/* eslint-disable no-shadow */

define([
'jquery',
'underscore',
'mage/utils/objects',
'mage/utils/strings'
], function (jQuery, _, utils, stringUtils) {
], function ($, _, utils, stringUtils) {
'use strict';

var tmplSettings = _.templateSettings,
Expand Down Expand Up @@ -176,7 +179,7 @@ define([

if (isTemplate(value)) {
list[key] = render(value, tmpl, castString);
} else if (jQuery.isPlainObject(value) || Array.isArray(value)) {
} else if ($.isPlainObject(value) || Array.isArray(value)) {
_.each(value, iterate);
}
});
Expand Down

0 comments on commit f0c4347

Please sign in to comment.