custom/plugins/CioCustomerMailbox/src/Resources/views/storefront/base.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% block base_main %}
  3.     {% if showUnreadMessagesModal %}
  4.         <!-- Modal -->
  5.         <div class="modal show" id="mailboxReminderModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" style="display: block; background: rgba(80, 80, 80, 0.8);">
  6.             <div class="modal-dialog" role="document">
  7.                 <div class="modal-content">
  8.                     <div class="modal-header d-flex justify-content-center p-2">
  9.                         <h5 class="modal-title" id="exampleModalLabel">{{ 'mailbox.popup.message'|trans }}</h5>
  10.                     </div>
  11.                     <div class="modal-footer d-flex justify-content-center p-3">
  12.                         <a href="{{ seoUrl('storefront.account.mailbox.home') }}" class="btn btn-primary">{{ 'mailbox.popup.viewButton'|trans }}</a>
  13.                         <a href="#" id="hideMailboxReminderButton" class="btn">{{ 'mailbox.popup.remindLaterButton'|trans }}</a>
  14.                     </div>
  15.                 </div>
  16.             </div>
  17.         </div>
  18.         <script>
  19.             function hideMailboxReminderModal(event) {
  20.                 event.preventDefault();
  21.                 var xhr = new XMLHttpRequest();
  22.                 xhr.open("GET", "{{ seoUrl('storefront.mailbox.remindlater') }}", true);
  23.                 xhr.send();
  24.                 document.getElementById('mailboxReminderModal').classList.remove('show');
  25.                 document.getElementById('mailboxReminderModal').style.display = 'none';
  26.             }
  27.             document.getElementById('hideMailboxReminderButton').addEventListener('click', hideMailboxReminderModal);
  28.         </script>
  29.     {% endif %}
  30.     {{ parent() }}
  31. {% endblock %}