Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
created.phtml
Go to the documentation of this file.
1 <?php
7 ?>
8 <script>
9 (function ($) {
10 
11  var data = <?= /* @escapeNotVerified */ $block->getAttributesBlockJson() ?>;
12  var set = data.set || {id: $('#attribute_set_id').val()};
13  if (data.tab == 'variations') {
14  $('[data-role=product-variations-matrix]').trigger('add', data.attribute);
15  } else {
16  $('[data-form=edit-product]').trigger('changeAttributeSet', set);
17  }
18  $('#create_new_attribute').modal('closeModal');
19 
20 })(window.parent.jQuery);
21 </script>
$block
Definition: block.php:8