Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
grid.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php
14 ?>
15 
16 <form id="currency-symbols-form" action="<?= /* @escapeNotVerified */ $block->getFormActionUrl() ?>" method="post">
17  <input name="form_key" type="hidden" value="<?= /* @escapeNotVerified */ $block->getFormKey() ?>" />
18  <fieldset class="admin__fieldset">
19  <?php foreach ($block->getCurrencySymbolsData() as $code => $data): ?>
20  <div class="admin__field _required">
21  <label class="admin__field-label" for="custom_currency_symbol<?= /* @escapeNotVerified */ $code ?>">
22  <span><?= /* @escapeNotVerified */ $code ?> (<?= /* @escapeNotVerified */ $data['displayName'] ?>)</span>
23  </label>
24  <div class="admin__field-control">
25  <input id="custom_currency_symbol<?= /* @escapeNotVerified */ $code ?>"
26  class="required-entry admin__control-text"
27  type="text"
28  value="<?= $block->escapeHtmlAttr($data['displaySymbol']) ?>"
29  <?= $data['inherited'] ? ' disabled="disabled"' : '' ?>
30  name="custom_currency_symbol[<?= /* @escapeNotVerified */ $code ?>]">
31  <div class="admin__field admin__field-option">
32  <input id="custom_currency_symbol_inherit<?= /* @escapeNotVerified */ $code ?>"
33  class="admin__control-checkbox" type="checkbox"
34  onclick="toggleUseDefault(<?= /* @escapeNotVerified */ '\'' . $code . '\',\'' . $block->escapeJs($data['parentSymbol']) . '\'' ?>)"
35  <?= $data['inherited'] ? ' checked="checked"' : '' ?>
36  value="1"
37  name="inherit_custom_currency_symbol[<?= /* @escapeNotVerified */ $code ?>]">
38  <label class="admin__field-label" for="custom_currency_symbol_inherit<?= /* @escapeNotVerified */ $code ?>"><span><?= /* @escapeNotVerified */ $block->getInheritText() ?></span></label>
39  </div>
40  </div>
41  </div>
42  <?php endforeach; ?>
43  </fieldset>
44 </form>
45 <script>
46 require(['jquery', "mage/mage", 'prototype'], function(jQuery){
47 
48  jQuery('#currency-symbols-form').mage('form').mage('validation');
49 
50  function toggleUseDefault(code, value)
51  {
52  checkbox = $('custom_currency_symbol_inherit'+code);
53  input = $('custom_currency_symbol'+code);
54  if (checkbox.checked) {
55  input.value = value;
56  input.disabled = true;
57  } else {
58  input.disabled = false;
59  }
60  }
61 
62  window.toggleUseDefault = toggleUseDefault;
63 });
64 </script>
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
Definition: block.php:9
jquery extjs ext tree mage adminhtml form
Definition: tree.phtml:41
$block
Definition: block.php:8
jquery extjs ext tree checkbox
Definition: tree.phtml:41
jQuery('.store-switcher .dropdown-menu li a').each(function()
Definition: switcher.phtml:203
foreach( $block->getColumns() as $_column)() ?><? endforeach
Definition: grid.phtml:39
$code
Definition: info.phtml:12