Skip to content

Commit dcc50d4

Browse files
author
Maksym Aposov
committed
Merge branch 'mainline_develop' into MAGETWO-40002
2 parents 90a3a39 + e5a2d00 commit dcc50d4

File tree

285 files changed

+7671
-3728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

285 files changed

+7671
-3728
lines changed

app/code/Magento/Authorizenet/view/frontend/web/template/payment/authorizenet-directpost.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"
6262
class="action primary checkout"
6363
disabled>
64-
<span data-bind="text: $t('Place Order')"></span>
64+
<span data-bind="i18n: 'Place Order'"></span>
6565
</button>
6666
</div>
6767
</div>

app/code/Magento/Backend/Model/Url.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ protected function _setRouteParams(array $data, $unsetOldParams = true)
181181
*/
182182
public function getUrl($routePath = null, $routeParams = null)
183183
{
184+
if (filter_var($routePath, FILTER_VALIDATE_URL)) {
185+
return $routePath;
186+
}
187+
184188
$cacheSecretKey = false;
185189
if (is_array($routeParams) && isset($routeParams['_cache_secret_key'])) {
186190
unset($routeParams['_cache_secret_key']);
@@ -190,6 +194,7 @@ public function getUrl($routePath = null, $routeParams = null)
190194
if (!$this->useSecretKey()) {
191195
return $result;
192196
}
197+
$this->_setRoutePath($routePath);
193198
$routeName = $this->_getRouteName('*');
194199
$controllerName = $this->_getControllerName(self::DEFAULT_CONTROLLER_NAME);
195200
$actionName = $this->_getActionName(self::DEFAULT_ACTION_NAME);

app/code/Magento/Backend/Test/Unit/Model/UrlTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,4 +407,10 @@ public function testGetSecretKeyGenerationWithRouteNameInForwardInfo()
407407
$keyFromRequest = $this->_model->getSecretKey();
408408
$this->assertEquals($keyFromParams, $keyFromRequest);
409409
}
410+
411+
public function testGetUrlWithUrlInRoutePath()
412+
{
413+
$routePath = 'https://localhost/index.php/catalog/product/view/id/100/?foo=bar#anchor';
414+
static::assertEquals($routePath, $this->_model->getUrl($routePath));
415+
}
410416
}

app/code/Magento/Backend/view/adminhtml/layout/default.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
</referenceContainer>
7070
<referenceContainer name="after.body.start">
7171
<block class="Magento\RequireJs\Block\Html\Head\Config" name="requirejs-config"/>
72+
<block class="Magento\Translation\Block\Html\Head\Config" name="translate-config"/>
7273
<block class="Magento\Translation\Block\Js" name="translate" template="Magento_Translation::translate.phtml"/>
7374
<block class="Magento\Framework\View\Element\Js\Components" name="head.components" as="components" template="Magento_Backend::page/js/components.phtml"/>
7475
<block class="Magento\Framework\View\Element\Html\Calendar" name="head.calendar" as="calendar" template="Magento_Backend::page/js/calendar.phtml"/>

app/code/Magento/Backend/view/adminhtml/templates/dashboard/grid.phtml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,25 @@ $numColumns = sizeof($block->getColumns());
4949
</div>
5050
<?php if ($block->canDisplayContainer()): ?>
5151
<script>
52-
var deps = ['mage/adminhtml/grid'];
52+
var deps = [];
53+
54+
<?php if ($block->getDependencyJsObject()): ?>
55+
deps.push('uiRegistry');
56+
<?php endif; ?>
5357

5458
<?php if (strpos($block->getRowClickCallback(), 'order.') !== false): ?>
55-
deps.push('Magento_Sales/order/create/form')
59+
deps.push('Magento_Sales/order/create/form');
5660
<?php endif; ?>
5761

58-
require(deps, function(){
62+
deps.push('mage/adminhtml/grid');
63+
64+
require(deps, function(<?php echo ($block->getDependencyJsObject() ? 'registry' : '') ?>){
5965
<?php //TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed ?>
6066

67+
<?php if ($block->getDependencyJsObject()): ?>
68+
registry.get('<?php echo $block->getDependencyJsObject() ?>', function (<?php echo $block->getDependencyJsObject() ?>) {
69+
<?php endif; ?>
70+
6171
<?php echo $block->getJsObjectName() ?> = new varienGrid('<?php echo $block->getId() ?>', '<?php echo $block->getGridUrl() ?>', '<?php echo $block->getVarNamePage() ?>', '<?php echo $block->getVarNameSort() ?>', '<?php echo $block->getVarNameDir() ?>', '<?php echo $block->getVarNameFilter() ?>');
6272
<?php echo $block->getJsObjectName() ?>.useAjax = '<?php echo $block->getUseAjax() ?>';
6373
<?php if ($block->getRowClickCallback()): ?>
@@ -74,6 +84,10 @@ require(deps, function(){
7484
<?php echo $block->getMassactionBlock()->getJavaScript() ?>
7585
<?php endif ?>
7686

87+
<?php if ($block->getDependencyJsObject()): ?>
88+
});
89+
<?php endif; ?>
90+
7791
});
7892
</script>
7993
<?php endif; ?>

app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,25 @@ $numColumns = sizeof($block->getColumns());
142142
<?php if ($block->canDisplayContainer()): ?>
143143
</div>
144144
<script>
145-
var deps = ['mage/adminhtml/grid'];
145+
var deps = [];
146+
147+
<?php if ($block->getDependencyJsObject()): ?>
148+
deps.push('uiRegistry');
149+
<?php endif; ?>
146150

147151
<?php if (strpos($block->getRowClickCallback(), 'order.') !== false): ?>
148-
deps.push('Magento_Sales/order/create/form');
152+
deps.push('Magento_Sales/order/create/form')
149153
<?php endif; ?>
150154

151-
require(deps, function(){
155+
deps.push('mage/adminhtml/grid');
156+
157+
require(deps, function(<?php echo ($block->getDependencyJsObject() ? 'registry' : '') ?>){
152158
<?php //TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed ?>
153159

160+
<?php if ($block->getDependencyJsObject()): ?>
161+
registry.get('<?php echo $block->getDependencyJsObject() ?>', function (<?php echo $block->getDependencyJsObject() ?>) {
162+
<?php endif; ?>
163+
154164
<?php echo $block->getJsObjectName() ?> = new varienGrid('<?php echo $block->getId() ?>', '<?php echo $block->getGridUrl() ?>', '<?php echo $block->getVarNamePage() ?>', '<?php echo $block->getVarNameSort() ?>', '<?php echo $block->getVarNameDir() ?>', '<?php echo $block->getVarNameFilter() ?>');
155165
<?php echo $block->getJsObjectName() ?>.useAjax = <?php echo $block->getUseAjax() ? 'true' : 'false' ?>;
156166
<?php if ($block->getRowClickCallback()): ?>
@@ -171,6 +181,10 @@ $numColumns = sizeof($block->getColumns());
171181
<?php echo $block->getChildBlock('grid.massaction')->getJavaScript() ?>
172182
<?php endif ?>
173183
<?php echo $block->getAdditionalJavaScript(); ?>
184+
185+
<?php if ($block->getDependencyJsObject()): ?>
186+
});
187+
<?php endif; ?>
174188
});
175189
</script>
176190
<?php endif; ?>

app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,16 +243,26 @@ $numColumns = sizeof($block->getColumns());
243243
<?php if ($block->canDisplayContainer()): ?>
244244
</div>
245245
<script>
246-
var deps = ['mage/adminhtml/grid'];
246+
var deps = [];
247+
248+
<?php if ($block->getDependencyJsObject()): ?>
249+
deps.push('uiRegistry');
250+
<?php endif; ?>
247251

248252
<?php if (strpos($block->getRowClickCallback(), 'order.') !== false): ?>
249253
deps.push('Magento_Sales/order/create/form')
250254
<?php endif; ?>
251255

252-
require(deps, function(){
256+
deps.push('mage/adminhtml/grid');
257+
258+
require(deps, function(<?php echo ($block->getDependencyJsObject() ? 'registry' : '') ?>){
253259
<?php //TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed ?>
254260

255261
//<![CDATA[
262+
<?php if ($block->getDependencyJsObject()): ?>
263+
registry.get('<?php echo $block->getDependencyJsObject() ?>', function (<?php echo $block->getDependencyJsObject() ?>) {
264+
<?php endif; ?>
265+
256266
<?php echo $block->getJsObjectName() ?> = new varienGrid('<?php echo $block->getId() ?>', '<?php echo $block->getGridUrl() ?>', '<?php echo $block->getVarNamePage() ?>', '<?php echo $block->getVarNameSort() ?>', '<?php echo $block->getVarNameDir() ?>', '<?php echo $block->getVarNameFilter() ?>');
257267
<?php echo $block->getJsObjectName() ?>.useAjax = '<?php echo $block->getUseAjax() ?>';
258268
<?php if ($block->getRowClickCallback()): ?>
@@ -269,6 +279,10 @@ $numColumns = sizeof($block->getColumns());
269279
<?php echo $block->getMassactionBlock()->getJavaScript() ?>
270280
<?php endif ?>
271281
<?php echo $block->getAdditionalJavaScript(); ?>
282+
283+
<?php if ($block->getDependencyJsObject()): ?>
284+
});
285+
<?php endif; ?>
272286
//]]>
273287

274288
});

app/code/Magento/Braintree/view/frontend/web/template/payment/braintree-paypal-form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"
4242
class="action primary checkout"
4343
disabled>
44-
<span data-bind="text: $t('Place Order')"></span>
44+
<span data-bind="i18n: 'Place Order'"></span>
4545
</button>
4646
</div>
4747
</div>

app/code/Magento/Braintree/view/frontend/web/template/payment/cc-form.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636

3737
<fieldset data-bind="attr: {class: 'fieldset payment items ccard ' + getCode(), id: 'braintree_form_cc'}">
3838
<!-- ko if: (isShowLegend())-->
39-
<legend class="legend"><span><!-- ko text: $t('Credit Card Information')--><!-- /ko --></span></legend><br />
39+
<legend class="legend"><span><!-- ko i18n: 'Credit Card Information'--><!-- /ko --></span></legend><br />
4040
<!-- /ko -->
4141
<!-- ko if: (useVault()) -->
4242
<div>
4343
<label data-bind="attr: {for: getCode() + '_cc_token'}" class="label">
44-
<span><!-- ko text: $t('Payment Information')--><!-- /ko --></span>
44+
<span><!-- ko i18n: 'Payment Information'--><!-- /ko --></span>
4545
</label>
4646
<div class="control">
4747
<select name="payment[cc_token]" class="select"
@@ -60,7 +60,7 @@
6060
<!-- /ko -->
6161
<div class="field type required" data-bind="visible: isCcFormShown">
6262
<label data-bind="attr: {for: getCode() + '_cc_type'}" class="label">
63-
<span><!-- ko text: $t('Credit Card Type')--><!-- /ko --></span>
63+
<span><!-- ko i18n: 'Credit Card Type'--><!-- /ko --></span>
6464
</label>
6565
<div class="control">
6666
<!-- ko if: (!isCcDetectionEnabled())-->
@@ -102,7 +102,7 @@
102102
</div>
103103
<div class="field number required" data-bind="visible: isCcFormShown">
104104
<label data-bind="attr: {for: getCode() + '_cc_number'}" class="label">
105-
<span><!-- ko text: $t('Credit Card Number')--><!-- /ko --></span>
105+
<span><!-- ko i18n: 'Credit Card Number'--><!-- /ko --></span>
106106
</label>
107107
<div class="control">
108108
<input type="number" name="payment[cc_number]" class="input-text" value=""
@@ -112,7 +112,7 @@
112112
</div>
113113
<div class="field date required" data-bind="attr: {id: getCode() + '_cc_type_exp_div'}, visible: isCcFormShown">
114114
<label data-bind="attr: {for: getCode() + '_expiration'}" class="label">
115-
<span><!-- ko text: $t('Expiration Date')--><!-- /ko --></span>
115+
<span><!-- ko i18n: 'Expiration Date'--><!-- /ko --></span>
116116
</label>
117117
<div class="control">
118118
<div class="fields group group-2">
@@ -148,7 +148,7 @@
148148
<!-- ko if: (hasVerification())-->
149149
<div class="field cvv required" data-bind="attr: {id: getCode() + '_cc_type_cvv_div'}, visible: isCcFormShown">
150150
<label data-bind="attr: {for: getCode() + '_cc_cid'}" class="label">
151-
<span><!-- ko text: $t('Card Verification Number')--><!-- /ko --></span>
151+
<span><!-- ko i18n: 'Card Verification Number'--><!-- /ko --></span>
152152
</label>
153153
<div class="control">
154154
<input type="number"
@@ -166,7 +166,7 @@
166166
tabindex="0"
167167
data-toggle="dropdown"
168168
data-bind="attr: {title: $t('What is this?')}, mageInit: {'dropdown':{'activeClass': '_active'}}">
169-
<span><!-- ko text: $t('What is this?')--><!-- /ko --></span>
169+
<span><!-- ko i18n: 'What is this?'--><!-- /ko --></span>
170170
</span>
171171
<div class="field-tooltip-content"
172172
data-target="dropdown"
@@ -189,7 +189,7 @@
189189
class="checkbox"
190190
data-bind="checked: storeInVault"/>
191191
<label class="label" for="braintree_store_in_vault">
192-
<span><!-- ko text: $t('Save this card for future use')--><!-- /ko --></span>
192+
<span><!-- ko i18n: 'Save this card for future use'--><!-- /ko --></span>
193193
</label>
194194
</div>
195195
</div>
@@ -212,7 +212,7 @@
212212
css: {disabled: !isPlaceOrderActionAllowed()}
213213
"
214214
disabled>
215-
<span data-bind="text: $t('Place Order')"></span>
215+
<span data-bind="i18n: 'Place Order'"></span>
216216
</button>
217217
</div>
218218
</div>

app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Renderer extends \Magento\Checkout\Block\Cart\Item\Renderer
2626
* @param \Magento\Framework\View\Element\Template\Context $context
2727
* @param \Magento\Catalog\Helper\Product\Configuration $productConfig
2828
* @param \Magento\Checkout\Model\Session $checkoutSession
29-
* @param \Magento\Catalog\Helper\Image $imageHelper
29+
* @param \Magento\Catalog\Helper\Image $imageBuilder
3030
* @param \Magento\Framework\Url\Helper\Data $urlHelper
3131
* @param \Magento\Framework\Message\ManagerInterface $messageManager
3232
* @param PriceCurrencyInterface $priceCurrency
@@ -39,7 +39,7 @@ public function __construct(
3939
\Magento\Framework\View\Element\Template\Context $context,
4040
\Magento\Catalog\Helper\Product\Configuration $productConfig,
4141
\Magento\Checkout\Model\Session $checkoutSession,
42-
\Magento\Catalog\Helper\Image $imageHelper,
42+
\Magento\Catalog\Block\Product\ImageBuilder $imageBuilder,
4343
\Magento\Framework\Url\Helper\Data $urlHelper,
4444
\Magento\Framework\Message\ManagerInterface $messageManager,
4545
PriceCurrencyInterface $priceCurrency,
@@ -52,7 +52,7 @@ public function __construct(
5252
$context,
5353
$productConfig,
5454
$checkoutSession,
55-
$imageHelper,
55+
$imageBuilder,
5656
$urlHelper,
5757
$messageManager,
5858
$priceCurrency,

app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</div>
2121
<div class="content">
2222
<div class="bundle-info">
23-
<?php echo $block->getLayout()->createBlock('Magento\Catalog\Block\Product\Image')->init($_product, 'bundled_product_customization_page')->toHtml() ?>
23+
<?php echo $block->getImage($_product, 'bundled_product_customization_page')->toHtml(); ?>
2424
<div class="product-details">
2525
<strong class="product name"><?php echo $block->escapeHtml($_product->getName()) ?></strong>
2626
<?php if ($_product->getIsSalable()): ?>

app/code/Magento/Captcha/view/frontend/web/template/checkout/captcha.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-->
77
<!-- ko if: (isRequired() && getIsVisible())-->
88
<div class="field captcha required" data-bind="blockLoader: getIsLoading()">
9-
<label data-bind="attr: {for: 'captcha_' + formId}" class="label"><span data-bind="text: $t('Please type the letters below')"></span></label>
9+
<label data-bind="attr: {for: 'captcha_' + formId}" class="label"><span data-bind="i18n: 'Please type the letters below'"></span></label>
1010
<div class="control captcha">
1111
<input name="captcha_string" type="text" class="input-text required-entry" data-bind="value: captchaValue(), attr: {id: 'captcha_' + formId, 'data-scope': dataScope}" />
1212
<input name="captcha_form_id" type="hidden" data-bind="value: formId, attr: {'data-scope': dataScope}" />
@@ -20,12 +20,12 @@
2020
}"
2121
class="captcha-img"/>
2222
<button type="button" class="action reload captcha-reload" data-bind="attr: {title: $t('Reload captcha')}, click: refresh">
23-
<span data-bind="text: $t('Reload captcha')"></span>
23+
<span data-bind="i18n: 'Reload captcha'"></span>
2424
</button>
2525
</div>
2626
</div>
2727
<!-- ko if: isCaseSensitive()-->
28-
<div class="captcha-note note" data-bind="text: $t('Attention: Captcha is case sensitive.')"></div>
28+
<div class="captcha-note note" data-bind="i18n: 'Attention: Captcha is case sensitive.'"></div>
2929
<!-- /ko -->
3030
</div>
3131
</div>

0 commit comments

Comments
 (0)