Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.2-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - #22448: [Backport] Translated exception message (by @yogeshsuhagiya)
 - #22451: [Backport] Translate comment tag in DHL config settings (by @yogeshsuhagiya)
 - #22441: [Backport] Fiexed 22152 - Click on search icon it does not working on admin grid sticky header (by @saphaljha)
 - #22440: [Backport] [Fixed] Category Update without "name" cannot be saved in scope "all" with REST API (by @saphaljha)
 - #22214: [Backport] [Widget] Fixing the multidimensional array as value for the widget's parameter (by @ilnytskyi)


Fixed GitHub Issues:
 - #22152: Click on search icon it does not working (reported by @Dharmeshvaja91) has been fixed in #22441 by @saphaljha in 2.2-develop branch
   Related commits:
     1. b3a799d

 - #22309: Category Update without "name" cannot be saved in scope "all" with REST API (reported by @cmuench) has been fixed in #22440 by @saphaljha in 2.2-develop branch
   Related commits:
     1. 20efb05

 - #19909: Not possible to use multidimensional arrays in widget parameters (reported by @ilnytskyi) has been fixed in #22214 by @ilnytskyi in 2.2-develop branch
   Related commits:
     1. 3a03838
     2. 4c84817
     3. 640127d
     4. 3a4150d
     5. c365d6c
  • Loading branch information
magento-engcom-team authored Apr 23, 2019
2 parents a1daa45 + d67f127 commit e913688
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function execute()
$this->logger->critical($e);
$this->messageManager->addExceptionMessage(
$e,
'The order #' . $quote->getReservedOrderId() . ' cannot be processed.'
__('The order #%1 cannot be processed.', $quote->getReservedOrderId())
);
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Api/Data/CategoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function setParentId($parentId);
/**
* Get category name
*
* @return string
* @return string|null
*/
public function getName();

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Dhl/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<field id="account" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Account Number</label>
</field>
<field id="content_type" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<field id="content_type" translate="label comment" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Content Type (Non Domestic)</label>
<comment>Whether to use Documents or NonDocuments service for non domestic shipments. (Shipments within the EU are classed as domestic)</comment>
<source_model>Magento\Dhl\Model\Source\Contenttype</source_model>
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Dhl/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Title,Title
Password,Password
"Account Number","Account Number"
"Content Type","Content Type"
"Whether to use Documents or NonDocuments service for non domestic shipments. (Shipments within the EU are classed as domestic)","Whether to use Documents or NonDocuments service for non domestic shipments. (Shipments within the EU are classed as domestic)"
"Calculate Handling Fee","Calculate Handling Fee"
"Handling Applied","Handling Applied"
"""Per Order"" allows a single handling fee for the entire order. ""Per Package"" allows an individual handling fee for each package.","""Per Order"" allows a single handling fee for the entire order. ""Per Package"" allows an individual handling fee for each package."
Expand Down
23 changes: 19 additions & 4 deletions app/code/Magento/Ui/view/base/web/js/grid/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ define([
'uiLayout',
'mage/translate',
'mageUtils',
'uiElement'
], function (_, layout, $t, utils, Element) {
'uiElement',
'jquery'
], function (_, layout, $t, utils, Element, $) {
'use strict';

return Element.extend({
Expand All @@ -29,11 +30,13 @@ define([
tracks: {
value: true,
previews: true,
inputValue: true
inputValue: true,
focused: true
},
imports: {
inputValue: 'value',
updatePreview: 'value'
updatePreview: 'value',
focused: false
},
exports: {
value: '${ $.provider }:params.search'
Expand Down Expand Up @@ -88,6 +91,18 @@ define([
return this;
},

/**
* Click To ScrollTop.
*/
scrollTo: function ($data) {
$('html, body').animate({
scrollTop: 0
}, 'slow', function () {
$data.focused = false;
$data.focused = true;
});
},

/**
* Resets input value to the last applied state.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
-->
<div class="data-grid-search-control-wrap">
<label class="data-grid-search-label" attr="title: $t('Search'), for: index">
<label class="data-grid-search-label" attr="title: $t('Search'), for: index" data-bind="click: scrollTo">
<span translate="'Search'"/>
</label>
<input class="admin__control-text data-grid-search-control" type="text"
Expand All @@ -16,6 +16,7 @@
placeholder: $t(placeholder)
},
textInput: inputValue,
hasFocus: focused,
keyboard: {
13: apply.bind($data, false),
27: cancel
Expand Down
11 changes: 7 additions & 4 deletions app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function getMainFieldset()
if ($this->_getData('main_fieldset') instanceof \Magento\Framework\Data\Form\Element\Fieldset) {
return $this->_getData('main_fieldset');
}
$mainFieldsetHtmlId = 'options_fieldset' . md5($this->getWidgetType());
$mainFieldsetHtmlId = 'options_fieldset' . hash('sha256', $this->getWidgetType());
$this->setMainFieldsetHtmlId($mainFieldsetHtmlId);
$fieldset = $this->getForm()->addFieldset(
$mainFieldsetHtmlId,
Expand Down Expand Up @@ -141,7 +141,6 @@ protected function _addField($parameter)
{
$form = $this->getForm();
$fieldset = $this->getMainFieldset();
//$form->getElement('options_fieldset');

// prepare element data with values (either from request of from default values)
$fieldName = $parameter->getKey();
Expand All @@ -159,15 +158,19 @@ protected function _addField($parameter)
$data['value'] = $parameter->getValue();
//prepare unique id value
if ($fieldName == 'unique_id' && $data['value'] == '') {
$data['value'] = md5(microtime(1));
$data['value'] = hash('sha256', microtime(1));
}
}

if (is_array($data['value'])) {
foreach ($data['value'] as &$value) {
$value = html_entity_decode($value);
if (is_string($value)) {
// phpcs:ignore Magento2.Functions.DiscouragedFunction
$value = html_entity_decode($value);
}
}
} else {
// phpcs:ignore Magento2.Functions.DiscouragedFunction
$data['value'] = html_entity_decode($data['value']);
}

Expand Down
17 changes: 11 additions & 6 deletions lib/internal/Magento/Framework/Data/Form/Element/Label.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* See COPYING.txt for license details.
*/

/**
* Data form abstract class
*
* @author Magento Core Team <core@magentocommerce.com>
*/
namespace Magento\Framework\Data\Form\Element;

use Magento\Framework\Phrase;

/**
* Label form element.
*/
class Label extends \Magento\Framework\Data\Form\Element\AbstractElement
{
/**
Expand All @@ -37,8 +37,13 @@ public function __construct(
public function getElementHtml()
{
$html = $this->getBold() ? '<div class="control-value special">' : '<div class="control-value">';
$html .= $this->getEscapedValue() . '</div>';
if (is_string($this->getValue()) || $this->getValue() instanceof Phrase) {
$html .= $this->getEscapedValue();
}

$html .= '</div>';
$html .= $this->getAfterElementHtml();

return $html;
}
}

0 comments on commit e913688

Please sign in to comment.