Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
default.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
12 $captcha = $block->getCaptchaModel();
13 ?>
14 <div class="admin__field _required">
15  <label for="captcha" class="admin__field-label">
16  <span><?= $block->escapeHtml(__('Please enter the letters and numbers from the image')) ?></span>
17  </label>
18  <div class="admin__field-control">
19  <input
20  id="captcha"
21  class="admin__control-text"
22  type="text"
23  name="<?= $block->escapeHtmlAttr(\Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE) ?>[<?= $block->escapeHtml($block->getFormId()) ?>]"
24  data-validate="{required:true}"/>
25  <?php if ($captcha->isCaseSensitive()) :?>
26  <div class="admin__field-note">
27  <span><?= $block->escapeHtml(__('<strong>Attention</strong>: Captcha is case sensitive.'), ['strong']) ?></span>
28  </div>
29  <?php endif; ?>
30  </div>
31 </div>
32 <div class="admin__field field-captcha">
33  <img
34  id="captcha-reload"
35  class="captcha-reload"
36  src="<?= $block->escapeUrl($block->getViewFileUrl('Magento_Captcha::reload.png')) ?>"
37  alt="<?= $block->escapeHtmlAttr(__('Reload captcha')) ?>"/>
38  <img
39  id="<?= $block->escapeHtmlAttr($block->getFormId()) ?>"
40  width="<?= /* @noEscape */ (float) $block->getImgWidth() ?>"
41  height="<?= /* @noEscape */ (float) $block->getImgHeight() ?>"
42  src="<?= $block->escapeUrl($captcha->getImgSrc()) ?>" />
43 </div>
44 <script>
45  require(["prototype", "mage/captcha"], function(){
46 
47 //<![CDATA[
48  var captcha = new Captcha('<?= $block->escapeJs($block->escapeUrl($block->getRefreshUrl())) ?>', '<?= $block->escapeJs($block->escapeHtml($block->getFormId())) ?>');
49 
50  $('captcha-reload').observe('click', function () {
51  captcha.refresh(this);
52  });
53 
54 //]]>
55 
56  });
57 </script>
__()
Definition: __.php:13
$block
Definition: block.php:8
if( $_item->getOrderItem() ->getParentItem())( $_item) ?><?php if( $_prevOptionId ! $_prevOptionId endif
Definition: default.phtml:41
if($block->getLink()) line height
Definition: email.phtml:11
$captcha
Definition: default.phtml:12