Skip to content

Commit 5a9fcf5

Browse files
author
Michail Slabko
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-36655
Conflicts: app/code/Magento/Catalog/view/adminhtml/templates/product/edit/tabs.phtml dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php
2 parents 67cee5c + 02e1801 commit 5a9fcf5

File tree

363 files changed

+14354
-3008
lines changed

Some content is hidden

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

363 files changed

+14354
-3008
lines changed

app/code/Magento/Backend/Block/Store/Switcher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,11 +548,11 @@ public function getHintHtml()
548548
$html = '';
549549
$url = $this->getHintUrl();
550550
if ($url) {
551-
$html = '<div class="tooltip">' . '<span class="help"><a' . ' href="' . $this->escapeUrl(
551+
$html = '<div class="admin__field-tooltip tooltip">' . '<a' . ' href="' . $this->escapeUrl(
552552
$url
553553
) . '"' . ' onclick="this.target=\'_blank\'"' . ' title="' . __(
554554
'What is this?'
555-
) . '"' . ' class="link-store-scope"><span>' . __(
555+
) . '"' . ' class="admin__field-tooltip-action action-help"><span>' . __(
556556
'What is this?'
557557
) . '</span></a></span>' . ' </div>';
558558
}

app/code/Magento/Backend/Service/V1/ModuleServiceInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
namespace Magento\Backend\Service\V1;
88

9+
/**
10+
* Interface for module service.
11+
*/
912
interface ModuleServiceInterface
1013
{
1114
/**

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,17 @@
142142
<label>Developer</label>
143143
<tab>advanced</tab>
144144
<resource>Magento_Backend::dev</resource>
145-
<group id="debug" translate="label" type="text" sortOrder="20" showInDefault="0" showInWebsite="1" showInStore="1">
145+
<group id="debug" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
146146
<label>Debug</label>
147-
<field id="template_hints" translate="label" type="select" sortOrder="20" showInDefault="0" showInWebsite="1" showInStore="1">
148-
<label>Template Path Hints</label>
147+
<field id="template_hints_storefront" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
148+
<label>Enabled Template Path Hints for Storefront</label>
149149
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
150150
</field>
151-
<field id="template_hints_blocks" translate="label" type="select" sortOrder="21" showInDefault="0" showInWebsite="1" showInStore="1">
151+
<field id="template_hints_admin" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
152+
<label>Enabled Template Path Hints for Admin</label>
153+
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
154+
</field>
155+
<field id="template_hints_blocks" translate="label" type="select" sortOrder="21" showInDefault="1" showInWebsite="1" showInStore="1">
152156
<label>Add Block Names to Hints</label>
153157
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
154158
</field>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
<?php endif; ?>
1414

1515
<?php if (!$_element->getNoContainer()): ?>
16-
<fieldset class="fieldset <?php /* @escapeNotVerified */ echo $_element->getClass() ?>" id="<?php echo $_element->getHtmlId() ?>">
16+
<fieldset class="admin__fieldset fieldset <?php /* @escapeNotVerified */ echo $_element->getClass() ?>" id="<?php echo $_element->getHtmlId() ?>">
1717
<?php endif; ?>
1818

1919
<?php if ($_element->getLegend()): ?>
20-
<legend class="legend">
20+
<legend class="admin__legend legend">
2121
<span><?php /* @escapeNotVerified */ echo $_element->getLegend() ?></span>
22-
</legend>
22+
</legend><br/>
2323
<?php /* @escapeNotVerified */ echo $_element->getHeaderBar() ?>
2424
<?php endif; ?>
2525
<?php echo $block->getHintHtml() ?>

app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset/element.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ $note = $element->getNote() ? '<div class="note">' . $element->getNote() . '</di
1414
$elementBeforeLabel = $element->getExtType() == 'checkbox' || $element->getExtType() == 'radio';
1515
$addOn = $element->getBeforeElementHtml() || $element->getAfterElementHtml();
1616
$fieldId = ($element->getHtmlContainerId()) ? ' id="' . $element->getHtmlContainerId() . '"' : '';
17-
$fieldClass = "field field-{$element->getId()} {$element->getCssClass()}";
17+
$fieldClass = "admin__field field field-{$element->getId()} {$element->getCssClass()}";
1818
$fieldClass .= ($elementBeforeLabel) ? ' choice' : '';
1919
$fieldClass .= ($addOn) ? ' with-addon' : '';
20-
$fieldClass .= ($element->getRequired()) ? ' required' : '';
20+
$fieldClass .= ($element->getRequired()) ? ' _required' : '';
2121
$fieldClass .= ($note) ? ' with-note' : '';
2222

2323
$fieldAttributes = $fieldId . ' class="' . $fieldClass . '" '
@@ -35,16 +35,16 @@ $fieldAttributes = $fieldId . ' class="' . $fieldClass . '" '
3535
<?php /* @escapeNotVerified */ echo $note ?>
3636
<?php else: ?>
3737
<?php echo $element->getLabelHtml() ?>
38-
<div class="control">
38+
<div class="admin__field-control control">
3939
<?php /* @escapeNotVerified */ echo($addOn) ? '<div class="addon">' . $element->getElementHtml() . '</div>' : $element->getElementHtml(); ?>
40+
<?php echo $block->getHintHtml() ?>
4041
<?php /* @escapeNotVerified */ echo $note ?>
4142
</div>
4243
<?php endif; ?>
4344
<?php if ($element->getScopeLabel()): ?>
4445
<div class="field-service" value-scope="<?php /* @escapeNotVerified */ echo $element->getScopeLabel()?>">
4546
</div>
4647
<?php endif;?>
47-
<?php echo $block->getHintHtml() ?>
4848
</div>
4949
<?php endif; ?>
5050
<?php endif; ?>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ if ($isField) {
5757
<?php if (!$element->getNoContainer()): ?>
5858
<fieldset class="<?php /* @escapeNotVerified */ echo $cssClass ?>" id="<?php /* @escapeNotVerified */ echo $id ?>">
5959
<?php if ($element->getLegend() && !$isWrapped): ?>
60-
<legend class="<?php /* @escapeNotVerified */ echo $isField ? 'label' : 'legend'?>">
60+
<legend class="<?php /* @escapeNotVerified */ echo $isField ? 'label admin__field-label' : 'admin__legend legend'?>">
6161
<span><?php /* @escapeNotVerified */ echo $element->getLegend() ?></span>
6262
</legend><br />
6363
<?php endif; ?>

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/cc-form.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ define(
349349
}
350350
});
351351
}
352+
},
353+
354+
getCssClass: function () {
355+
return (this.isCcDetectionEnabled()) ? 'field type detection' : 'field type required';
352356
}
353357
});
354358
}

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
2-
3-
41
<!--
52
/**
63
* Copyright © 2015 Magento. All rights reserved.
@@ -61,10 +58,12 @@
6158
</div>
6259
<div>&nbsp;</div>
6360
<!-- /ko -->
64-
<div class="field type required" data-bind="visible: isCcFormShown">
61+
<div data-bind="visible: isCcFormShown, attr: {class: getCssClass()}">
62+
<!-- ko if: (!isCcDetectionEnabled())-->
6563
<label data-bind="attr: {for: getCode() + '_cc_type'}" class="label">
6664
<span><!-- ko i18n: 'Credit Card Type'--><!-- /ko --></span>
6765
</label>
66+
<!-- /ko -->
6867
<div class="control">
6968
<!-- ko if: (!isCcDetectionEnabled())-->
7069
<select name="payment[cc_type]" class="select"
@@ -153,7 +152,7 @@
153152
<label data-bind="attr: {for: getCode() + '_cc_cid'}" class="label">
154153
<span><!-- ko i18n: 'Card Verification Number'--><!-- /ko --></span>
155154
</label>
156-
<div class="control">
155+
<div class="control _with-tooltip">
157156
<input type="number"
158157
class="input-text cvv"
159158
name="payment[cc_cid]"
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Bundle\Api\Data;
8+
9+
/**
10+
* Interface BundleOptionInterface
11+
* @api
12+
*/
13+
interface BundleOptionInterface extends \Magento\Framework\Api\ExtensibleDataInterface
14+
{
15+
/**
16+
* Get bundle option id.
17+
*
18+
* @return int
19+
*/
20+
public function getOptionId();
21+
22+
/**
23+
* Set bundle option id.
24+
*
25+
* @param int $optionId
26+
* @return int
27+
*/
28+
public function setOptionId($optionId);
29+
30+
/**
31+
* Get bundle option quantity.
32+
*
33+
* @return int
34+
*/
35+
public function getOptionQty();
36+
37+
/**
38+
* Set bundle option quantity.
39+
*
40+
* @param int $optionQty
41+
* @return int
42+
*/
43+
public function setOptionQty($optionQty);
44+
45+
/**
46+
* Get bundle option selection ids.
47+
*
48+
* @return int[]
49+
*/
50+
public function getOptionSelections();
51+
52+
/**
53+
* Set bundle option selection ids.
54+
*
55+
* @param int[] $optionSelections
56+
* @return int[]
57+
*/
58+
public function setOptionSelections(array $optionSelections);
59+
60+
/**
61+
* Retrieve existing extension attributes object or create a new one.
62+
*
63+
* @return \Magento\Bundle\Api\Data\BundleOptionExtensionInterface|null
64+
*/
65+
public function getExtensionAttributes();
66+
67+
/**
68+
* Set an extension attributes object.
69+
*
70+
* @param \Magento\Bundle\Api\Data\BundleOptionExtensionInterface $extensionAttributes
71+
* @return $this
72+
*/
73+
public function setExtensionAttributes(
74+
\Magento\Bundle\Api\Data\BundleOptionExtensionInterface $extensionAttributes
75+
);
76+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Bundle\Model;
7+
8+
use Magento\Framework\Model\AbstractExtensibleModel;
9+
use Magento\Bundle\Api\Data\BundleOptionInterface;
10+
11+
class BundleOption extends AbstractExtensibleModel implements BundleOptionInterface
12+
{
13+
/**#@+
14+
* Constants
15+
*/
16+
const OPTION_ID = 'option_id';
17+
const OPTION_QTY = 'option_qty';
18+
const OPTION_SELECTIONS = 'option_selections';
19+
/**#@-*/
20+
21+
/**
22+
* {@inheritdoc}
23+
* @codeCoverageIgnore
24+
*/
25+
public function getOptionId()
26+
{
27+
return $this->getData(self::OPTION_ID);
28+
}
29+
30+
/**
31+
* {@inheritdoc}
32+
* @codeCoverageIgnore
33+
*/
34+
public function getOptionQty()
35+
{
36+
return $this->getData(self::OPTION_QTY);
37+
}
38+
39+
/**
40+
* {@inheritdoc}
41+
* @codeCoverageIgnore
42+
*/
43+
public function getOptionSelections()
44+
{
45+
return $this->getData(self::OPTION_SELECTIONS);
46+
}
47+
48+
/**
49+
* {@inheritdoc}
50+
* @codeCoverageIgnore
51+
*/
52+
public function setOptionId($optionId)
53+
{
54+
return $this->setData(self::OPTION_ID, $optionId);
55+
}
56+
57+
/**
58+
* {@inheritdoc}
59+
* @codeCoverageIgnore
60+
*/
61+
public function setOptionQty($optionQty)
62+
{
63+
return $this->setData(self::OPTION_QTY, $optionQty);
64+
}
65+
66+
/**
67+
* {@inheritdoc}
68+
* @codeCoverageIgnore
69+
*/
70+
public function setOptionSelections(array $optionSelections)
71+
{
72+
return $this->setData(self::OPTION_SELECTIONS, $optionSelections);
73+
}
74+
75+
/**
76+
* {@inheritdoc}
77+
* @codeCoverageIgnore
78+
*/
79+
public function getExtensionAttributes()
80+
{
81+
return $this->_getExtensionAttributes();
82+
}
83+
84+
/**
85+
* {@inheritdoc}
86+
* @codeCoverageIgnore
87+
*/
88+
public function setExtensionAttributes(\Magento\Bundle\Api\Data\BundleOptionExtensionInterface $extensionAttributes)
89+
{
90+
return $this->_setExtensionAttributes($extensionAttributes);
91+
}
92+
}

0 commit comments

Comments
 (0)