Skip to content

Commit 5483fb9

Browse files
author
Mykhailo Miroshnikov
committed
- Process GiftMessage/frontend/templates/inline.phtml
1 parent ad0290c commit 5483fb9

File tree

1 file changed

+18
-24
lines changed
  • app/code/Magento/GiftMessage/view/frontend/templates

1 file changed

+18
-24
lines changed

app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,12 @@ require(['jquery'], function(jQuery){
131131
<dt class="extra-options-container" id="extra-options-container-<?php echo $block->getEntity()->getId() ?>"></dt>
132132
</dl>
133133
</fieldset>
134-
<script>
135-
require([
136-
'jquery',
137-
'mage/mage'
138-
], function(jQuery){
139-
140-
jQuery('#allow_gift_options').add('#allow_gift_options_for_order').add('#allow_gift_options_for_items').mage('giftOptions');
141-
142-
});
134+
<script type="text/x-magento-init">
135+
{
136+
"#allow_gift_options, #allow_gift_options_for_order, #allow_gift_options_for_items": {
137+
"giftOptions": {}
138+
}
139+
}
143140
</script>
144141
<?php break; ?>
145142

@@ -253,24 +250,21 @@ require([
253250
<dt class="extra-options-container" id="extra-options-container-<?php echo $block->getEntity()->getId() ?>"></dt>
254251
</dl>
255252
</fieldset>
256-
<script>
257-
require(['jquery', 'mage/mage'], function(jQuery){
258-
259-
jQuery('#allow_gift_options_<?php echo $block->getEntity()->getId() ?>')
260-
.add('#allow_gift_options_for_order_<?php echo $block->getEntity()->getId() ?>')
261-
.add('#allow_gift_options_for_items_<?php echo $block->getEntity()->getId() ?>')
262-
.mage('giftOptions');
263-
264-
});
253+
<script type="text/x-magento-init">
254+
{
255+
"#allow_gift_options_<?php echo $block->getEntity()->getId() ?>, #allow_gift_options_for_order_<?php echo $block->getEntity()->getId() ?>, #allow_gift_options_for_items_<?php echo $block->getEntity()->getId() ?>": {
256+
"giftOptions": {}
257+
}
258+
}
265259
</script>
266260
<?php break; ?>
267261
<?php endswitch ?>
268262
<?php if ($_giftMessage): ?>
269-
<script>
270-
require(['jquery', "mage/mage"], function(jQuery){
271-
272-
jQuery('#shipping_method_form').mage('validation');
273-
274-
});
263+
<script type="text/x-magento-init">
264+
{
265+
"#shipping_method_form": {
266+
"validation": {}
267+
}
268+
}
275269
</script>
276270
<?php endif; ?>

0 commit comments

Comments
 (0)