noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 323/323: ANCGL Test if at least one operation


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 323/323: ANCGL Test if at least one operation is selected
Date: Wed, 14 Mar 2018 17:39:15 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 2711cee094e1df29dadddc22ddf22dd4f307392b
Author: Dany De Bontridder <address@hidden>
Date:   Wed Mar 14 22:34:45 2018 +0100

    ANCGL Test  if at least one operation is selected
---
 include/anc_great_ledger.inc.php | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/include/anc_great_ledger.inc.php b/include/anc_great_ledger.inc.php
index 3cf291b..cfec336 100644
--- a/include/anc_great_ledger.inc.php
+++ b/include/anc_great_ledger.inc.php
@@ -36,7 +36,7 @@ if ($result != null)
         echo '</span>';
         $task_id=uniqid();
         echo $grandLivre->show_button();
-        printf ('<form method="GET" id="export_anc_receipt_pdf" 
action="export.php" style="display:inline" 
onsubmit="progress_bar_start(\'%s\',\'%s\');return true;">',
+        printf ('<form method="GET" id="export_anc_receipt_pdf" 
action="export.php" style="display:inline" onsubmit="return 
start_export_anc_receipt_pdf(\'%s\',\'%s\');">',
                 $task_id,
                 _("Le traitement est en cours ,  merci de patienter sans 
recharger la page")
                );
@@ -47,6 +47,30 @@ if ($result != null)
         echo HtmlInput::get_to_hidden(array('ac','gDossier','sa'));
         echo '</form>';
         echo $grandLivre->show_button();
+        ?>
+<script>
+    function start_export_anc_receipt_pdf(p_task_id,p_message)
+    {
+        var a=document.getElementsByName("ck[]");
+        var i=0;
+        var valid=false;
+        for ( i =0;i < a.length;i++) {
+            if ( a[i].checked == true) {
+                valid=true;
+                break;
+            }
+        }
+        if ( valid  ) {
+            progress_bar_start(p_task_id,p_message);
+            return true;
+        } else {
+            smoke.alert("<?=_('Choisissez au moins une opération')?>");
+            return false;
+        }
+        
+    }
+</script>
+<?php
     }
     else
     {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]