Explorar o código

Add xml file accept on document

stany.ferer hai 1 ano
pai
achega
c264d24a13
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  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 {