checkbox colum on left for ledger list
This commit is contained in:
parent
306d0c0b3a
commit
9c64a21bd9
@ -686,7 +686,7 @@ if ($massaction == 'preunletteringauto') {
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||||
|
|
||||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
|
||||||
if ($massactionbutton && $contextpage != 'poslist') {
|
if ($massactionbutton && $contextpage != 'poslist') {
|
||||||
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||||
}
|
}
|
||||||
@ -740,7 +740,13 @@ print '<table class="tagtable liste centpercent">';
|
|||||||
|
|
||||||
// Filters lines
|
// Filters lines
|
||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
|
// Action column
|
||||||
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print '<td class="liste_titre center">';
|
||||||
|
$searchpicto = $form->showFilterButtons('left');
|
||||||
|
print $searchpicto;
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
// Movement number
|
// Movement number
|
||||||
if (!empty($arrayfields['t.piece_num']['checked'])) {
|
if (!empty($arrayfields['t.piece_num']['checked'])) {
|
||||||
print '<td class="liste_titre"><input type="text" name="search_mvt_num" class="width50" value="'.dol_escape_htmltag($search_mvt_num).'"></td>';
|
print '<td class="liste_titre"><input type="text" name="search_mvt_num" class="width50" value="'.dol_escape_htmltag($search_mvt_num).'"></td>';
|
||||||
@ -819,13 +825,18 @@ $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // N
|
|||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="liste_titre center">';
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
$searchpicto = $form->showFilterButtons();
|
print '<td class="liste_titre center">';
|
||||||
print $searchpicto;
|
$searchpicto = $form->showFilterButtons();
|
||||||
print '</td>';
|
print $searchpicto;
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
}
|
||||||
if (!empty($arrayfields['t.piece_num']['checked'])) {
|
if (!empty($arrayfields['t.piece_num']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
@ -863,7 +874,9 @@ if (!empty($arrayfields['t.import_key']['checked'])) {
|
|||||||
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$displayed_account_number = null; // Start with undefined to be able to distinguish with empty
|
$displayed_account_number = null; // Start with undefined to be able to distinguish with empty
|
||||||
@ -976,7 +989,18 @@ while ($i < min($num, $limit)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
// Action column
|
||||||
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print '<td class="nowraponall center">';
|
||||||
|
if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // 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($line->id, $arrayofselected)) {
|
||||||
|
$selected = 1;
|
||||||
|
}
|
||||||
|
print '<input id="cb' . $line->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $line->id . '"' . ($selected ? ' checked="checked"' : '') . ' />';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
// Piece number
|
// Piece number
|
||||||
if (!empty($arrayfields['t.piece_num']['checked'])) {
|
if (!empty($arrayfields['t.piece_num']['checked'])) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -1149,15 +1173,17 @@ while ($i < min($num, $limit)) {
|
|||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="nowraponall center">';
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
print '<td class="nowraponall center">';
|
||||||
$selected = 0;
|
if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
if (in_array($line->id, $arrayofselected)) {
|
$selected = 0;
|
||||||
$selected = 1;
|
if (in_array($line->id, $arrayofselected)) {
|
||||||
|
$selected = 1;
|
||||||
|
}
|
||||||
|
print '<input id="cb' . $line->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $line->id . '"' . ($selected ? ' checked="checked"' : '') . ' />';
|
||||||
}
|
}
|
||||||
print '<input id="cb' . $line->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $line->id . '"' . ($selected ? ' checked="checked"' : '') . ' />';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user