Prechádzať zdrojové kódy

Add xml file accept on document

stany.ferer 1 rok pred
rodič
commit
c264d24a13
1 zmenil súbory, kde vykonal 4 pridanie a 4 odobranie
  1. 4 4
      core/javascript/cms.document.php

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

@@ -28,8 +28,8 @@
     function dargAndDrop() {
         var fileName = $("#document-import").val().split('\\').pop();
         var ext = fileName.split('.').pop();
-        if (ext !== "pdf" && ext !== "png" && ext !== "jpg") {
-            $("#printToastErrorTxt").html("Seuls les fichiers PDF, JPG et PNG sont acceptés");
+        if (ext !== "pdf" && ext !== "png" && ext !== "jpg" && ext !== "xml") {
+            $("#printToastErrorTxt").html("Seuls les fichiers PDF, JPG, PNG et XML sont acceptés");
             $("#printToastError").toast('show');
             $('#attachement-document').val("");
         } else {
@@ -40,8 +40,8 @@
     function dargAndDropAttachment() {
         var fileName = $("#attachement-document").val().split('\\').pop();
         var ext = fileName.split('.').pop();
-        if (ext !== "pdf" && ext !== "png" && ext !== "jpg") {
-            $("#printToastErrorTxt").html("Seuls les fichiers PDF, JPG et PNG sont acceptés");
+        if (ext !== "pdf" && ext !== "png" && ext !== "jpg" && ext !== "xml") {
+            $("#printToastErrorTxt").html("Seuls les fichiers PDF, JPG, PNG et XML sont acceptés");
             $("#printToastError").toast('show');
             $('#attachement-document').val("");
         } else {