Massaction delete for cash control list
This commit is contained in:
parent
d67caba300
commit
ee737191fa
@ -178,8 +178,8 @@ if (empty($reshook)) {
|
||||
// Mass actions
|
||||
$objectclass = 'CashControl';
|
||||
$objectlabel = 'CashControl';
|
||||
//$uploaddir = '';
|
||||
//include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
$uploaddir = $conf->bank->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
}
|
||||
|
||||
|
||||
@ -376,15 +376,9 @@ $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters,
|
||||
$param .= $hookmanager->resPrint;
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
||||
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
||||
);
|
||||
//if ($permissiontodelete) {
|
||||
// $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||
//}
|
||||
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) {
|
||||
$arrayofmassactions = array();
|
||||
$arrayofmassactions = array();
|
||||
if (!empty($permissiontodelete)) {
|
||||
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||
}
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
@ -585,7 +579,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
$object->cheque = $obj->cheque;
|
||||
|
||||
|
||||
print $object->getKanbanView('');
|
||||
print $object->getKanbanView('', array('selected' => in_array($object->id, $arrayofselected)));
|
||||
if ($i == (min($num, $limit) - 1)) {
|
||||
print '</div>';
|
||||
print '</td></tr>';
|
||||
|
||||
@ -641,7 +641,7 @@ while ($i < $imaxinloop) {
|
||||
}
|
||||
// Output Kanban
|
||||
$chargesociale_static->fk_project = $projectstatic->getNomUrl();
|
||||
print $chargesociale_static->getKanbanView('');
|
||||
print $chargesociale_static->getKanbanView('', array('selected' => in_array($chargesociale_static->id, $arrayofselected)));
|
||||
if ($i == ($imaxinloop - 1)) {
|
||||
print '</div>';
|
||||
print '</td></tr>';
|
||||
@ -655,10 +655,10 @@ while ($i < $imaxinloop) {
|
||||
print '<td class="center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($obj->rowid, $arrayofselected)) {
|
||||
if (in_array($chargesociale_static->id, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
}
|
||||
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
print '<input id="cb'.$chargesociale_static->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$chargesociale_static->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
@ -807,10 +807,10 @@ while ($i < $imaxinloop) {
|
||||
print '<td class="center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($obj->rowid, $arrayofselected)) {
|
||||
if (in_array($chargesociale_static->id, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
}
|
||||
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
print '<input id="cb'.$chargesociale_static->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$chargesociale_static->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user