2
0
stany.ferer 1 жил өмнө
parent
commit
485dab44b0

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

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