Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

68 строки
1.9 KiB

  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
  7. /** @var \Magento\Customer\Block\Widget\Dob $block */
  8. /*
  9. <?= $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Dob')
  10. ->setDate($block->getCustomer()->getDob())
  11. ->toHtml() ?>
  12. For checkout/onepage/billing.phtml:
  13. <?= $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Dob')
  14. ->setDate($block->getCustomer()->getDob())
  15. ->setFieldIdFormat('billing:%s')
  16. ->setFieldNameFormat('billing[%s]')
  17. ->toHtml() ?>
  18. NOTE: Regarding styles - if we leave it this way, we'll move it to boxes.css. Alternatively we could calculate widths
  19. automatically using block input parameters.
  20. */
  21. $translatedCalendarConfigJson = $block->getTranslatedCalendarConfigJson();
  22. $fieldCssClass = 'field date field-' . $block->getHtmlId();
  23. $fieldCssClass .= $block->isRequired() ? ' required' : '';
  24. ?>
  25. <div class="<?= $block->escapeHtmlAttr($fieldCssClass) ?>">
  26. <label class="label" for="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>">
  27. <span><?= $block->escapeHtml($block->getStoreLabel('dob')) ?></span>
  28. </label>
  29. <div class="control customer-dob">
  30. <?= $block->getFieldHtml() ?>
  31. <?php if ($_message = $block->getAdditionalDescription()): ?>
  32. <div class="note"><?= $block->escapeHtml($_message) ?></div>
  33. <?php endif; ?>
  34. </div>
  35. </div>
  36. <script type="text/x-magento-init">
  37. {
  38. "*": {
  39. "Magento_Customer/js/validation": {}
  40. }
  41. }
  42. </script>
  43. <?php $scriptString = <<<code
  44. require([
  45. 'jquery',
  46. 'jquery-ui-modules/datepicker'
  47. ], function($){
  48. //<![CDATA[
  49. $.extend(true, $, {
  50. calendarConfig: {$translatedCalendarConfigJson}
  51. });
  52. //]]>
  53. });
  54. code;
  55. ?>
  56. <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>