app/Plugin/EccubePaymentLite42/Resource/template/admin/Product/add_free_area_description_form.twig line 1

Open in your IDE?
  1. <script>
  2.     function changeRegularCycleFormHandle(selectedSaleTypeId, regularSaleTypeId) {
  3.         if (selectedSaleTypeId === regularSaleTypeId) {
  4.             $('#admin_product_free_description_about_quantity').prop('disabled', false);
  5.             $('#admin_product_free_description_about_selling_price').prop('disabled', false);
  6.             $('#admin_product_free_description_of_payment_delivery').prop('disabled', false);
  7.         } else {
  8.             $('#admin_product_free_description_about_quantity').prop('disabled', true);
  9.             $('#admin_product_free_description_about_selling_price').prop('disabled', true);
  10.             $('#admin_product_free_description_of_payment_delivery').prop('disabled', true);
  11.         }
  12.     }
  13.     $(function() {
  14.         {# 定期サイクルフォームの追加 #}
  15.         $('#freeArea').parent().after($('#free_description_box'));
  16.         var regularSaleTypeId = '{{ regularSaleTypeId }}';
  17.         {# 定期サイクルフォーム初期読み込み時、使用可、不可を設定 #}
  18.         changeRegularCycleFormHandle($('#admin_product_class_sale_type option:selected').val(), regularSaleTypeId);
  19.         {# 販売種別変更時に、定期サイクルフォームの使用可、不可を設定 #}
  20.         $('#admin_product_class_sale_type').on('change', function() {
  21.             var selectedSaleTypeId = $(this).val();
  22.             changeRegularCycleFormHandle(selectedSaleTypeId, regularSaleTypeId);
  23.         });
  24.         var sale_type_flg = '{{ sale_type_flg }}';
  25.         if(sale_type_flg){
  26.             $('#admin_product_free_description_about_quantity').prop('disabled', false);
  27.             $('#admin_product_free_description_about_selling_price').prop('disabled', false);
  28.             $('#admin_product_free_description_of_payment_delivery').prop('disabled', false);
  29.         }
  30.     });
  31. </script>
  32. <div id="free_description_box" class="card rounded border-0 mb-4">
  33.     <div class="card-header">
  34.         <div class="row">
  35.             <div class="col-8">
  36.                 <div class="d-inline-block" data-tooltip="true" data-placement="top" title="特定商法取引に関する項目">
  37.                     <span class="card-title">特定商法取引に関する項目</span>
  38.                     <i class="fa fa-question-circle fa-lg ml-1"></i>
  39.                 </div>
  40.             </div>
  41.             <div class="col-4 text-end">
  42.                 <a data-bs-toggle="collapse" href="#free_description" aria-expanded="false" aria-controls="free_description">
  43.                     <i class="fa fa-angle-up fa-lg"></i>
  44.                 </a>
  45.             </div>
  46.         </div>
  47.     </div>
  48.     <div id="free_description">
  49.         <div class="collapse show ec-cardCollapse" id="free_description_about_quantity">
  50.             <div class="card-body">
  51.                 <div class="row">
  52.                     <div class="col-3">
  53.                         <span>分量に関するフリー記述</span>
  54.                     </div>
  55.                     <div class="col-9">
  56.                         <div>
  57.                             {{ form_widget(form.free_description_about_quantity, {attr : { rows : "8", placeholder : '入力例)購入者が定期購入を解除した場合、または商品販売が終了するまで自動継続'} }) }}
  58.                             {{ form_errors(form.free_description_about_quantity) }}
  59.                         </div>
  60.                     </div>
  61.                 </div>
  62.             </div>
  63.         </div>
  64.         <div class="collapse show ec-cardCollapse" id="free_description_about_selling_price">
  65.             <div class="card-body">
  66.                 <div class="row">
  67.                     <div class="col-3">
  68.                         <span>販売価格に関するフリー記述</span>
  69.                     </div>
  70.                     <div class="col-9">
  71.                         <div>
  72.                             {{ form_widget(form.free_description_about_selling_price, {attr : { rows : "8" ,placeholder : '入力例)購入者が定期購入を解除した場合、または商品販売が終了するまで自動継続' } }) }}
  73.                             {{ form_errors(form.free_description_about_selling_price) }}
  74.                         </div>
  75.                     </div>
  76.                 </div>
  77.             </div>
  78.         </div>
  79.         <div class="collapse show ec-cardCollapse" id="free_description_of_payment_delivery">
  80.             <div class="card-body">
  81.                 <div class="row">
  82.                     <div class="col-3">
  83.                         <span>お支払い・引き渡しに関するフリー記述</span>
  84.                     </div>
  85.                     <div class="col-9">
  86.                         <div>
  87.                             {{ form_widget(form.free_description_of_payment_delivery, {attr : { rows : "8", placeholder : '入力例)購入者が定期購入を解除した場合、または商品販売が終了するまで自動継続'} }) }}
  88.                             {{ form_errors(form.free_description_of_payment_delivery) }}
  89.                         </div>
  90.                     </div>
  91.                 </div>
  92.             </div>
  93.         </div>
  94.     </div>
  95. </div>