Skip to content

Commit 924ca40

Browse files
committed
Merge remote-tracking branch 'origin/develop' into MAGETWO-51472
2 parents 798a579 + e60afa2 commit 924ca40

File tree

92 files changed

+3041
-942
lines changed

Some content is hidden

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

92 files changed

+3041
-942
lines changed

app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<button attr="{disabled: disabled}"
1616
class="action-secondary"
1717
type="button"
18-
click="addChild.bind($data, false, false)">
18+
click="processingAddChild.bind($data, false, false, false)">
1919
<span text="addButtonLabel"/>
2020
</button>
2121
</div>
@@ -59,7 +59,7 @@
5959
</tr>
6060
</thead>
6161

62-
<tbody data-bind="foreach: elems">
62+
<tbody>
6363
<tr repeat="foreach: elems, item: '$record'"
6464
class="data-row"
6565
css="'_odd-row': $index % 2">

app/code/Magento/Catalog/etc/config.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,12 @@
5757
</allowed_resources>
5858
</media_storage_configuration>
5959
</system>
60+
<design>
61+
<watermark>
62+
<image_position>stretch</image_position>
63+
<small_image_position>stretch</small_image_position>
64+
<thumbnail_position>stretch</thumbnail_position>
65+
</watermark>
66+
</design>
6067
</default>
6168
</config>

app/code/Magento/Catalog/etc/di.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@
630630
<item name="watermark_image_position" xsi:type="array">
631631
<item name="path" xsi:type="string">design/watermark/image_position</item>
632632
<item name="fieldset" xsi:type="string">other_settings/watermark/image</item>
633-
<item name="default" xsi:type="string">stretch</item>
633+
634634
</item>
635635
<item name="watermark_small_image_size" xsi:type="array">
636636
<item name="path" xsi:type="string">design/watermark/small_image_size</item>
@@ -658,7 +658,6 @@
658658
<item name="watermark_small_image_position" xsi:type="array">
659659
<item name="path" xsi:type="string">design/watermark/small_image_position</item>
660660
<item name="fieldset" xsi:type="string">other_settings/watermark/small_image</item>
661-
<item name="default" xsi:type="string">stretch</item>
662661
</item>
663662
<item name="watermark_thumbnail_size" xsi:type="array">
664663
<item name="path" xsi:type="string">design/watermark/thumbnail_size</item>
@@ -686,7 +685,6 @@
686685
<item name="watermark_thumbnail_position" xsi:type="array">
687686
<item name="path" xsi:type="string">design/watermark/thumbnail_position</item>
688687
<item name="fieldset" xsi:type="string">other_settings/watermark/thumbnail</item>
689-
<item name="default" xsi:type="string">stretch</item>
690688
</item>
691689
</argument>
692690
</arguments>

app/code/Magento/Checkout/etc/frontend/sections.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<action name="rest/*/V1/carts/*/payment-information">
4343
<section name="cart"/>
4444
<section name="checkout-data"/>
45+
<section name="last-ordered-items"/>
4546
</action>
4647
<action name="rest/*/V1/guest-carts/*/payment-information">
4748
<section name="cart"/>

app/code/Magento/CheckoutAgreements/view/frontend/templates/additional_agreements.phtml

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,45 @@
66

77
// @codingStandardsIgnoreFile
88

9-
?>
10-
<?php
119
/**
1210
* @var $block \Magento\CheckoutAgreements\Block\Agreements
1311
*/
14-
?>
15-
<?php if (!$block->getAgreements()) {
12+
if (!$block->getAgreements()) {
1613
return;
17-
} ?>
18-
<ol id="checkout-agreements" class="agreements checkout items">
19-
<?php /** @var \Magento\CheckoutAgreements\Api\Data\AgreementInterface $agreement */ ?>
20-
<?php foreach ($block->getAgreements() as $agreement): ?>
21-
<li class="item">
22-
<div class="checkout-agreement-item-content"<?php echo($agreement->getContentHeight() ? ' style="height:' . $agreement->getContentHeight() . '"' : '')?>>
23-
<?php if ($agreement->getIsHtml()):?>
24-
<?php /* @escapeNotVerified */ echo $agreement->getContent() ?>
25-
<?php else:?>
26-
<?php echo nl2br($block->escapeHtml($agreement->getContent())) ?>
27-
<?php endif; ?>
28-
</div>
29-
<?php if($agreement->getMode() == \Magento\CheckoutAgreements\Model\AgreementModeOptions::MODE_MANUAL): ?>
30-
<div id="checkout-agreements-form-<?php /* @escapeNotVerified */ echo $agreement->getAgreementId()?>" class="field choice agree required">
31-
<input type="checkbox"
32-
id="agreement-<?php /* @escapeNotVerified */ echo $agreement->getAgreementId()?>"
33-
name="agreement[<?php /* @escapeNotVerified */ echo $agreement->getAgreementId()?>]"
34-
value="1"
35-
title="<?php echo $block->escapeHtml($agreement->getCheckboxText()) ?>"
36-
class="checkbox"
37-
data-validate="{required:true}"/>
38-
<label class="label" for="agreement-<?php /* @escapeNotVerified */ echo $agreement->getAgreementId()?>">
39-
<span><?php echo $agreement->getIsHtml() ? $agreement->getCheckboxText() : $block->escapeHtml($agreement->getCheckboxText()) ?></span>
40-
</label>
41-
</div>
42-
<?php elseif($agreement->getMode() == \Magento\CheckoutAgreements\Model\AgreementModeOptions::MODE_AUTO): ?>
43-
<div id="checkout-agreements-form-<?php /* @escapeNotVerified */ echo $agreement->getAgreementId()?>" class="field choice agree">
44-
<span><?php echo $agreement->getIsHtml() ? $agreement->getCheckboxText() : $block->escapeHtml($agreement->getCheckboxText()) ?></span>
45-
</div>
46-
<?php endif; ?>
47-
</li>
48-
<?php endforeach ?>
49-
</ol>
14+
}
15+
16+
/** @var \Magento\CheckoutAgreements\Model\ResourceModel\Agreement\Collection $argeementsCollection */
17+
$argeementsCollection = $block->getAgreements();
18+
$agreementMappedArray = [];
19+
/** @var \Magento\CheckoutAgreements\Model\Agreement $agreement */
20+
foreach ($argeementsCollection as $agreement) {
21+
if ($agreement->getIsActive()) {
22+
$agreementMappedArray[] = [
23+
'mode' => $agreement->getMode(),
24+
'agreementId' => $agreement->getAgreementId(),
25+
'checkboxText' => $agreement->getCheckboxText(),
26+
'content' => $agreement->getContent()
27+
];
28+
}
29+
}
30+
$agreementJson = json_encode($agreementMappedArray);
31+
?>
32+
33+
<div data-bind="scope: 'checkout-agreements-component-scope'" class="checkout-agreements-block">
34+
<!-- ko template: getTemplate() --><!-- /ko -->
35+
</div>
36+
<script type="text/x-magento-init">
37+
{
38+
"*": {
39+
"Magento_Ui/js/core/app": {
40+
"components": {
41+
"checkout-agreements-component-scope": {
42+
"component": "Magento_CheckoutAgreements/js/view/checkout-agreements",
43+
"agreements": <?php /* @noEscape */ echo $agreementJson; ?>,
44+
"isVisible": true
45+
}
46+
}
47+
}
48+
}
49+
}
50+
</script>

app/code/Magento/CheckoutAgreements/view/frontend/web/js/model/agreement-validator.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ define(
1111
],
1212
function ($) {
1313
'use strict';
14-
var agreementsConfig = window.checkoutConfig.checkoutAgreements;
14+
var checkoutConfig = window.checkoutConfig,
15+
agreementsConfig = checkoutConfig ? checkoutConfig.checkoutAgreements : {};
16+
1517
return {
1618
/**
1719
* Validate checkout agreements

app/code/Magento/CheckoutAgreements/view/frontend/web/js/view/checkout-agreements.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ define(
1111
],
1212
function (ko, $, Component, agreementsModal) {
1313
'use strict';
14-
var agreementsConfig = window.checkoutConfig.checkoutAgreements,
15-
agreementManualMode = 1;
14+
var checkoutConfig = window.checkoutConfig,
15+
agreementManualMode = 1,
16+
agreementsConfig = checkoutConfig ? checkoutConfig.checkoutAgreements : {};
1617

1718
return Component.extend({
1819
defaults: {

app/code/Magento/CheckoutAgreements/view/frontend/web/template/checkout/checkout-agreements.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66
-->
7-
<form data-role="checkout-agreements" method="post">
7+
<div data-role="checkout-agreements">
88
<div class="checkout-agreements" data-bind="visible: isVisible">
99
<!-- ko foreach: agreements -->
1010
<!-- ko if: ($parent.isAgreementRequired($data)) -->
@@ -15,8 +15,7 @@
1515
'name': 'agreement[' + agreementId + ']',
1616
'value': agreementId
1717
}"
18-
data-validate="{required:true}"
19-
>
18+
data-validate="{required:true}" />
2019
<label data-bind="attr: {'for': 'agreement_' + agreementId}">
2120
<button type="button"
2221
class="action action-show"
@@ -40,4 +39,4 @@
4039
<div class="checkout-agreements-item-content" data-bind="html: modalContent"></div>
4140
</div>
4241
</div>
43-
</form>
42+
</div>

app/code/Magento/Cms/view/adminhtml/layout/cms_block_edit.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
-->
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
99
<update handle="styles"/>
10+
<update handle="editor"/>
1011
<body>
1112
<referenceContainer name="content">
1213
<uiComponent name="cms_block_form"/>

app/code/Magento/Cms/view/adminhtml/layout/cms_page_edit.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77
-->
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
9+
<update handle="editor"/>
910
<body>
1011
<referenceContainer name="content">
1112
<uiComponent name="cms_page_form"/>

0 commit comments

Comments
 (0)