app/template/default/Block/Sp/Item/error_modal.twig line 1

Open in your IDE?
  1. <style>
  2.     #error_modal.modal {
  3.         display: none;
  4.         position: fixed;
  5.         z-index: 10001;
  6.         padding-top: 200px;
  7.         left: 0;
  8.         top: 0;
  9.         width: 100%;
  10.         height: 100%;
  11.         overflow: auto;
  12.         background-color: rgb(0, 0, 0);
  13.         background-color: rgba(0, 0, 0, 0.4);
  14.     }
  15.     #error_modal .modal-content {
  16.         background-color: #fefefe;
  17.         margin: auto;
  18.         border: 1px solid #888;
  19.         width: 500px;
  20.         max-width: 90%;
  21.     }
  22.     #error_modal .modal-content .modal-header {
  23.         padding: 7px;
  24.         border-bottom: none;
  25.     }
  26.     #error_modal .modal-content .modal-header img {
  27.         width: 30px;
  28.         vertical-align: middle;
  29.     }
  30.     #error_modal .modal-content .modal-header span {
  31.         font-size: 25px;
  32.         font-weight: bold;
  33.         vertical-align: middle;
  34.     }
  35.     #error_modal .modal-content .modal-body {
  36.         padding-top: 5px;
  37.         padding-bottom: 5px;
  38.     }
  39.     #error_modal .modal-content .modal-body p {
  40.         margin-bottom: 5px;
  41.     }
  42.     #error_modal .modal-content .modal-body a {
  43.         font-weight: bold;
  44.     }
  45.     #error_modal .modal-content .modal-footer {
  46.         border-top: none;
  47.         padding: 15px;
  48.     }
  49.     #error_modal .modal-content .modal-footer .alert-btn-continue {
  50.         padding: 10px;
  51.         border-radius: 5px;
  52.         background: #FA9401;
  53.         color: white;
  54.         font-weight: bold;
  55.         text-decoration: unset;
  56.         margin-right: 10px;
  57.     }
  58.     #error_modal .modal-content .modal-footer .alert-btn-cancel {
  59.         padding: 10px;
  60.         text-decoration: unset;
  61.         color: #333;
  62.         border-radius: 5px;
  63.         background: #F3F3F3;
  64.         font-weight: bold;
  65.         width: fit-content;
  66.         margin: 0;
  67.         float: none;
  68.         border: none;
  69.     }
  70.     #error_modal .modal-content .modal-footer a.disabled {
  71.         color: currentColor;
  72.         cursor: not-allowed;
  73.         opacity: 0.5;
  74.         text-decoration: none;
  75.     }
  76. </style>
  77. <script>
  78.     function showErrorModal(errorMessage) {
  79.         var overlayEle = $('.bg-load-overlay');
  80.         if (overlayEle.length) {
  81.                 overlayEle.fadeOut(function () {
  82.                 $(this).remove();
  83.             });
  84.         }
  85.         $('#error_modal .error-message').html(errorMessage);
  86.         $('#error_modal .alert-btn-cancel').removeClass('disabled');
  87.         $('#error_modal .alert-btn-continue').removeClass('disabled');
  88.         $('#error_modal').show();
  89.     }
  90.     function closeErrorModal() {
  91.         $('#error_modal .error-message').html('');
  92.         $('#error_modal').hide();
  93.     }
  94.     $(document).on('click', '.see-the-cart', function () {
  95.         $('#error_modal .alert-btn-cancel').addClass('disabled');
  96.         $('#error_modal .alert-btn-continue').addClass('disabled');
  97.     })
  98. </script>
  99. <div id="error_modal" class="modal">
  100.     <div class="modal-content">
  101.         <div class="modal-header">
  102.             <img src="/stylesheets/images/icons-png/warning.png"/>
  103.             <span>注意</span>
  104.         </div>
  105.         <div class="modal-body">
  106.             <p class="error-message"></p>
  107.         </div>
  108.         <div class="modal-footer">
  109.             <a class="alert-btn-continue see-the-cart" href="{{ url("cart") }}">カートを見る</a>
  110.             <a class="alert-btn-cancel" onclick="closeErrorModal();" href="javascript:void(0);">キャンセル</a>
  111.         </div>
  112.     </div>
  113. </div>