Skip to content

Commit 0c66c83

Browse files
committed
Merge branch 'develop' of github.corp.ebay.com:magento2/magento2ce into VM
2 parents 6a208ea + 7673c14 commit 0c66c83

File tree

104 files changed

+1066
-652
lines changed

Some content is hidden

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

104 files changed

+1066
-652
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © 2015 Magento. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Customer:etc/sections.xsd">
10+
<action name="authorizenet/directpost_payment/place">
11+
<section name="cart"/>
12+
<section name="checkout-data"/>
13+
</action>
14+
</config>

app/code/Magento/Authorizenet/view/frontend/web/js/view/payment/method-renderer/authorizenet-directpost.js

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
* Copyright © 2015 Magento. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
/*browser:true*/
6-
/*global define*/
75
define(
86
[
97
'jquery',
108
'Magento_Payment/js/view/payment/iframe',
119
'Magento_Checkout/js/action/set-payment-information',
12-
'Magento_Checkout/js/model/payment/additional-validators'
10+
'Magento_Checkout/js/model/payment/additional-validators',
11+
'Magento_Checkout/js/model/full-screen-loader'
1312
],
14-
function ($, Component, setPaymentInformationAction, additionalValidators) {
13+
function ($, Component, setPaymentInformationAction, additionalValidators, fullScreenLoader) {
1514
'use strict';
15+
1616
return Component.extend({
1717
defaults: {
1818
template: 'Magento_Authorizenet/payment/authorizenet-directpost'
@@ -44,13 +44,24 @@ define(
4444
return true;
4545
},
4646

47-
placeOrder: function() {
47+
/**
48+
* @override
49+
*/
50+
placeOrder: function () {
4851
var self = this;
52+
53+
fullScreenLoader.startLoader();
54+
4955
if (this.validateHandler() && additionalValidators.validate()) {
5056
this.isPlaceOrderActionAllowed(false);
51-
$.when(setPaymentInformationAction(this.messageContainer, {'method': self.getCode()})).done(function() {
52-
self.placeOrderHandler();
53-
}).fail(function() {
57+
$.when(setPaymentInformationAction(this.messageContainer, {
58+
'method': self.getCode()
59+
})).done(function () {
60+
self.placeOrderHandler().fail(function () {
61+
fullScreenLoader.stopLoader();
62+
});
63+
}).fail(function () {
64+
fullScreenLoader.stopLoader();
5465
self.isPlaceOrderActionAllowed(true);
5566
});
5667
}

app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if (!isset($advancedLabel)) {
2222
$advancedLabel = __('Additional Settings');
2323
}
2424

25-
$cssClass = ($isField) ? 'field ' . $element->getClass() : 'fieldset admin__fieldset ' . $element->getClass();
25+
$cssClass = ($isField) ? 'field ' . $element->getClass() : 'fieldset admin__fieldset' . $element->getClass();
2626

2727
if ($isField) {
2828
$count = $element->getCountBasicChildren();
@@ -91,11 +91,11 @@ if ($isField) {
9191

9292
<?php if ($element->hasAdvanced() && !$isField): ?>
9393
<?php echo(!$element->getNoContainer() && $advancedAfter) ? '</fieldset>' : ''?>
94-
<details data-mage-init='{"details": {}}' class="details" id="details<?php /* @escapeNotVerified */ echo $id ?>">
95-
<summary class="details-summary" id="details-summary<?php /* @escapeNotVerified */ echo $id ?>">
94+
<details data-mage-init='{"details": {}}' class="details admin__collapsible-block-wrapper" id="details<?php /* @escapeNotVerified */ echo $id ?>">
95+
<summary class="details-summary admin__collapsible-title" id="details-summary<?php /* @escapeNotVerified */ echo $id ?>">
9696
<span><?php /* @escapeNotVerified */ echo $advancedLabel ?></span>
9797
</summary>
98-
<div class="details-content" id="details-content<?php /* @escapeNotVerified */ echo $id ?>">
98+
<div class="details-content admin__fieldset" id="details-content<?php /* @escapeNotVerified */ echo $id ?>">
9999
<?php echo $element->getAdvancedChildrenHtml(); ?>
100100
</div>
101101
</details>

app/code/Magento/Bundle/view/base/templates/product/price/tier_prices.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $tierPriceModel = $block->getPrice();
1616
$tierPrices = $tierPriceModel->getTierPriceList();
1717
?>
1818
<?php if (count($tierPrices)) : ?>
19-
<ul class="<?php /* @escapeNotVerified */ echo($block->hasListClass() ? $block->getListClass() : 'prices tier items'); ?>">
19+
<ul class="<?php /* @escapeNotVerified */ echo($block->hasListClass() ? $block->getListClass() : 'prices-tier items'); ?>">
2020
<?php foreach ($tierPrices as $index => $price) : ?>
2121
<li class="item">
2222
<?php /* @escapeNotVerified */ echo __(

app/code/Magento/Captcha/view/frontend/web/js/view/checkout/defaultCaptcha.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@ define(
2828
this._super();
2929
captchaConfig = window[this.configSource]['captcha'];
3030

31-
$.each(captchaConfig, function(formId, captchaData) {
32-
captchaData.formId = formId;
33-
captchaList.add(Captcha(captchaData));
34-
});
31+
if (captchaConfig) {
32+
$.each(captchaConfig, function(formId, captchaData) {
33+
captchaData.formId = formId;
34+
captchaList.add(Captcha(captchaData));
35+
});
36+
}
3537
},
3638
getIsLoading: function() {
37-
return this.currentCaptcha.isLoading
39+
return this.currentCaptcha !== null ? this.currentCaptcha.isLoading : false;
3840
},
3941
getCurrentCaptcha: function() {
4042
return this.currentCaptcha;
@@ -43,25 +45,25 @@ define(
4345
this.currentCaptcha = captcha;
4446
},
4547
getFormId: function() {
46-
return this.currentCaptcha.getFormId();
48+
return this.currentCaptcha !== null ? this.currentCaptcha.getFormId() : null;
4749
},
4850
getIsVisible: function() {
49-
return this.currentCaptcha.getIsVisible();
51+
return this.currentCaptcha !== null ? this.currentCaptcha.getIsVisible() : false;
5052
},
5153
setIsVisible: function(flag) {
5254
this.currentCaptcha.setIsVisible(flag);
5355
},
5456
isRequired: function() {
55-
return this.currentCaptcha.getIsRequired();
57+
return this.currentCaptcha !== null ? this.currentCaptcha.getIsRequired() : false;
5658
},
5759
isCaseSensitive: function() {
58-
return this.currentCaptcha.getIsCaseSensitive();
60+
return this.currentCaptcha !== null ? this.currentCaptcha.getIsCaseSensitive() : false;
5961
},
6062
imageHeight: function() {
61-
return this.currentCaptcha.getImageHeight();
63+
return this.currentCaptcha !== null ? this.currentCaptcha.getImageHeight() : null;
6264
},
6365
getImageSource: function () {
64-
return this.currentCaptcha.getImageSource();
66+
return this.currentCaptcha !== null ? this.currentCaptcha.getImageSource() : null;
6567
},
6668
refresh: function() {
6769
this.currentCaptcha.refresh();

app/code/Magento/Catalog/view/adminhtml/web/product/product.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@
325325

326326
.admin__scope-old .tiers_table .col-qty span {
327327
font-size: 1rem;
328+
white-space: nowrap;
328329
}
329330

330331
.admin__scope-old .tiers_table .col-price .input-text {

app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
<div class="actions-primary">
6464
<?php if ($_item->isSaleable()): ?>
6565
<form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $this->helper('Magento\Catalog\Helper\Product\Compare')->getAddToCartUrl($_item); ?>" method="post">
66+
<?php echo $block->getBlockHtml('formkey')?>
6667
<button type="submit" class="action tocart primary">
6768
<span><?php /* @escapeNotVerified */ echo __('Add to Cart'); ?></span>
6869
</button>

app/code/Magento/Catalog/view/frontend/templates/product/list.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output');
8181
<form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post">
8282
<input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
8383
<input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
84+
<?php echo $block->getBlockHtml('formkey')?>
8485
<button type="submit"
8586
title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
8687
class="action tocart primary">

app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $_product->getId() ?>" />
2222
<input type="hidden" name="selected_configurable_option" value="" />
2323
<input type="hidden" name="related_product" id="related-products-field" value="" />
24+
<?php echo $block->getBlockHtml('formkey')?>
2425
<?php echo $block->getChildHtml('form_top'); ?>
2526
<?php if (!$block->hasOptions()):?>
2627
<?php echo $block->getChildHtml('product_info_form_content'); ?>

app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ protected function getFieldConfig(
193193

194194
if (isset($attributeConfig['value']) && $attributeConfig['value'] != null) {
195195
$element['value'] = $attributeConfig['value'];
196+
} elseif (isset($attributeConfig['default']) && $attributeConfig['default'] != null) {
197+
$element['value'] = $attributeConfig['default'];
196198
} else {
197199
$defaultValue = $this->getDefaultValue($attributeCode);
198200
if (null !== $defaultValue) {
@@ -254,7 +256,7 @@ protected function getMultilineFieldConfig($attributeCode, array $attributeConfi
254256
unset($attributeConfig['validation']['required-entry']);
255257
for ($lineIndex = 0; $lineIndex < (int)$attributeConfig['size']; $lineIndex++) {
256258
$isFirstLine = $lineIndex === 0;
257-
$lines[] = [
259+
$line = [
258260
'component' => 'Magento_Ui/js/form/element/abstract',
259261
'config' => [
260262
// customScope is used to group elements within a single form e.g. they can be validated separately
@@ -271,7 +273,12 @@ protected function getMultilineFieldConfig($attributeCode, array $attributeConfi
271273
)
272274
: $attributeConfig['validation'],
273275
'additionalClasses' => $isFirstLine ? : 'additional'
276+
274277
];
278+
if ($isFirstLine && isset($attributeConfig['default']) && $attributeConfig['default'] != null) {
279+
$line['value'] = $attributeConfig['default'];
280+
}
281+
$lines[] = $line;
275282
}
276283
return [
277284
'component' => 'Magento_Ui/js/form/components/group',

0 commit comments

Comments
 (0)