Skip to content

Commit

Permalink
Merge pull request #5818 from magento-tsg/MC-35197
Browse files Browse the repository at this point in the history
[TSG] MC-35197: Unexpected loading of the “Create New Order” page in the Magento Admin panel
  • Loading branch information
zakdma authored Jun 17, 2020
2 parents 3ed3bfc + 495832c commit 763e47b
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 21 deletions.
22 changes: 16 additions & 6 deletions app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
?>

<?php if ($block->getChildHtml()):?>
<div id="gift_options_configure_new" class="gift-options-popup product-configure-popup">
<div id="gift_options_configure_new" class="gift-options-popup product-configure-popup no-display">
<div id="gift_options_form_contents">
<div class="content">
<?= $block->getChildHtml() ?>
Expand All @@ -23,11 +23,21 @@
</div>
</div>
</div>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div#gift_options_configure_new') ?>
<div id="giftoptions_tooltip_window" class="gift-options-tooltip">
<div id="giftoptions_tooltip_window_content">&nbsp;</div>
</div>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div#giftoptions_tooltip_window') ?>
<div id="giftoptions_tooltip_window" class="gift-options-tooltip no-display">
<div id="giftoptions_tooltip_window_content">&nbsp;</div>
</div>
<?php $scriptString = <<<script
require(['jquery'], function($){
'use strict';
$('div#gift_options_configure_new').css('display', 'none');
$('div#gift_options_configure_new').removeClass('no-display');
$('div#giftoptions_tooltip_window').css('display', 'none');
$('div#giftoptions_tooltip_window').removeClass('no-display');
});
script;
?>
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
<?php $scriptString = <<<script
require([
"Magento_Sales/order/create/giftmessage",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,41 @@
<div id="order-message">
<?= $block->getChildHtml('message') ?>
</div>
<div id="order-customer-selector" class="fieldset-wrapper order-customer-selector">
<div id="order-customer-selector" class="fieldset-wrapper order-customer-selector no-display">
<?= $block->getChildHtml('customer.grid.container') ?>
</div>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
'display:' . /* @noEscape */ $block->getCustomerSelectorDisplay(),
'div#order-customer-selector'
) ?>
<div id="order-store-selector" class="fieldset-wrapper">
<div id="order-store-selector" class="fieldset-wrapper no-display">
<?= $block->getChildHtml('store') ?>
</div>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
'display:' . /* @noEscape */ $block->getStoreSelectorDisplay(),
'div#order-store-selector'
) ?>
<div id="order-data">
<div id="order-data" class="no-display">
<?= $block->getChildHtml('data') ?>
</div>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
'display:' . /* @noEscape */ $block->getDataSelectorDisplay(),
'div#order-data'
) ?>
</form>
<?php $scriptString = <<<Script
require(['jquery'], function($){
'use strict';
Script;
if ($block->getCustomerSelectorDisplay()) {
$scriptString .= <<<Script
$('div#order-customer-selector').css('display', '{$block->getCustomerSelectorDisplay()}');
$('div#order-customer-selector').removeClass('no-display');
Script;
}
if ($block->getStoreSelectorDisplay()) {
$scriptString .= <<<Script
$('div#order-store-selector').css('display', '{$block->getStoreSelectorDisplay()}');
$('div#order-store-selector').removeClass('no-display');
Script;
}
if ($block->getDataSelectorDisplay()) {
$scriptString .= <<<Script
$('div#order-data').css('display', '{$block->getDataSelectorDisplay()}');
$('div#order-data').removeClass('no-display');
Script;
}
$scriptString .= <<<Script
});
Script;
?>
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>

0 comments on commit 763e47b

Please sign in to comment.