瀏覽代碼

Add attachment doc autre

stany.ferer 1 年之前
父節點
當前提交
485dab44b0
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      core/javascript/cms.document.php

+ 5 - 4
core/javascript/cms.document.php

@@ -33,12 +33,10 @@
         });
 
         if (allFieldsFilled) {
-
             const selectedType = $("#id_type").val();
-            if (selectedType !== "1") {
+            if (selectedType !== "1" || selectedType !== "0") {
                 $("#id_client").val("");
             }
-
             form.submit();
         }
     }
@@ -135,14 +133,17 @@
             max: 5
         });
     });
+
 <?php } ?>
+
     $(document).ready(function() {
         $("#id_type").change(function() {
-            if ($("#id_type").val() === "1") {
+            if ($("#id_type").val() === "1" || $("#id_type").val() === "0") {
                 $("#client-section").show();
             } else {
                 $("#client-section").hide();
             }
         });
     });
+
 </script>