Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
container.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
10  ?>
11 <?= /* @escapeNotVerified */ $block->getFormInitScripts() ?>
12 <?php if ($block->getButtonsHtml('header')): ?>
13  <div class="page-form-actions" <?= /* @escapeNotVerified */ $block->getUiId('content-header') ?>><?= $block->getButtonsHtml('header') ?></div>
14 <?php endif; ?>
15 <?php if ($block->getButtonsHtml('toolbar')): ?>
16  <div class="page-main-actions">
17  <div class="page-actions">
18  <div class="page-actions-buttons">
19  <?= $block->getButtonsHtml('toolbar') ?>
20  </div>
21  </div>
22  </div>
23 <?php endif; ?>
24 <?= $block->getFormHtml() ?>
25 <?php if ($block->hasFooterButtons()): ?>
26  <div class="content-footer">
27  <p class="form-buttons"><?= $block->getButtonsHtml('footer') ?></p>
28  </div>
29 <?php endif; ?>
30 <script>
31 require([
32  'jquery',
33  'mage/backend/form',
34  'mage/backend/validation'
35 ], function($){
36 
37  $('#edit_form').form()
38  .validation({
39  validationUrl: '<?= /* @escapeNotVerified */ $block->getValidationUrl() ?>',
40  highlight: function(element) {
41  var detailsElement = $(element).closest('details');
42  if (detailsElement.length && detailsElement.is('.details')) {
43  var summaryElement = detailsElement.find('summary');
44  if (summaryElement.length && summaryElement.attr('aria-expanded') === "false") {
45  summaryElement.trigger('click');
46  }
47  }
48  $(element).trigger('highlight.validate');
49  }
50  });
51 
52 });
53 </script>
54 <?= /* @escapeNotVerified */ $block->getFormScripts() ?>
if( $block->getButtonsHtml( 'header'))( 'content-header') ?>><? endif
Definition: container.phtml:12
jquery extjs ext tree mage adminhtml form
Definition: tree.phtml:41
$block
Definition: block.php:8