ANCGL Test if at least one operation is selected
This commit is contained in:
parent
e9a89cf078
commit
2711cee094
1 changed files with 25 additions and 1 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue