File tree Expand file tree Collapse file tree 1 file changed +24
-16
lines changed
app/code/Magento/UrlRewrite/view/adminhtml/templates Expand file tree Collapse file tree 1 file changed +24
-16
lines changed Original file line number Diff line number Diff line change 8
8
9
9
/** @var \Magento\UrlRewrite\Block\Catalog\Category\Tree $block */
10
10
?>
11
- <fieldset class="admin__fieldset" data-ui-id="category-selector">
12
- <legend class="admin__legend"><span><?= $ block ->escapeHtml (__ ('Select Category ' )) ?> </span></legend>
13
- <div class="content content-category-tree">
14
- <input type="hidden" name="categories" id="product_categories" value="" />
15
- <?php if ($ block ->getRoot ()): ?>
16
- <div data-mage-init='<?php /* @noEscape */ echo $ this ->helper ('Magento\Framework\Json\Helper\Data ' )->jsonEncode (
17
- [
18
- 'categoryTree ' => [
19
- 'data ' => $ block ->getTreeArray (),
20
- 'url ' => $ block ->escapeUrl ($ block ->getLoadTreeUrl ()),
21
- ],
22
- ]
23
- ); ?> ' class="jstree-default"></div>
24
- <?php endif ; ?>
25
- </div>
26
- </fieldset>
11
+ <fieldset class="admin__fieldset" data-ui-id="category-selector">
12
+ <legend class="admin__legend"><span><?= $ block ->escapeHtml (__ ('Select Category ' )) ?> </span></legend>
13
+ <div class="content content-category-tree">
14
+ <input type="hidden" name="categories" id="product_categories" value=""/>
15
+ <?php if ($ block ->getRoot ()): ?>
16
+ <div class="jstree-default"></div>
17
+ <?php endif ; ?>
18
+ </div>
19
+ </fieldset>
20
+ <?php if ($ block ->getRoot ()): ?>
21
+ <script type="text/x-magento-init">
22
+ {
23
+ ".jstree-default": {
24
+ "categoryTree": {
25
+ "data": <?php /* @noEscape */
26
+ echo $ this ->helper ('Magento\Framework\Json\Helper\Data ' )->jsonEncode ($ block ->getTreeArray ()); ?> ,
27
+ "url": "<?php /* @noEscape */
28
+ echo $ block ->escapeUrl ($ block ->getLoadTreeUrl ()); ?> "
29
+ }
30
+ }
31
+ }
32
+
33
+ </script>
34
+ <?php endif ; ?>
You can’t perform that action at this time.
0 commit comments