NEW #20650 completing checkcolumn on left for contact list
This commit is contained in:
parent
1cc9eda9a6
commit
1db386c695
@ -772,7 +772,7 @@ print $hookmanager->resPrint;
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
$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) {
|
if ($massactionbutton) {
|
||||||
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||||
}
|
}
|
||||||
@ -782,6 +782,13 @@ print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" :
|
|||||||
|
|
||||||
// Lines for filter fields
|
// Lines for filter fields
|
||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
|
// Action column
|
||||||
|
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||||
|
print '<td class="liste_titre maxwidthsearch">';
|
||||||
|
$searchpicto = $form->showFilterButtons('left');
|
||||||
|
print $searchpicto;
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
if (!empty($arrayfields['p.rowid']['checked'])) {
|
if (!empty($arrayfields['p.rowid']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat searchstring" type="text" name="search_id" size="1" value="'.dol_escape_htmltag($search_id).'">';
|
print '<input class="flat searchstring" type="text" name="search_id" size="1" value="'.dol_escape_htmltag($search_id).'">';
|
||||||
@ -934,15 +941,19 @@ if (!empty($arrayfields['p.import_key']['checked'])) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||||
$searchpicto = $form->showFilterAndCheckAddButtons(0);
|
print '<td class="liste_titre maxwidthsearch">';
|
||||||
print $searchpicto;
|
$searchpicto = $form->showFilterAndCheckAddButtons(0);
|
||||||
print '</td>';
|
print $searchpicto;
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Ligne des titres
|
// Ligne des titres
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||||
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
}
|
||||||
if (!empty($arrayfields['p.rowid']['checked'])) {
|
if (!empty($arrayfields['p.rowid']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.rowid']['label'], $_SERVER["PHP_SELF"], "p.rowid", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['p.rowid']['label'], $_SERVER["PHP_SELF"], "p.rowid", "", $param, "", $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
@ -1032,7 +1043,9 @@ if (!empty($arrayfields['p.statut']['checked'])) {
|
|||||||
if (!empty($arrayfields['p.import_key']['checked'])) {
|
if (!empty($arrayfields['p.import_key']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
}
|
}
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||||
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
@ -1064,6 +1077,18 @@ while ($i < min($num, $limit)) {
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
|
// Action column
|
||||||
|
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||||
|
print '<td class="nowrap 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)) {
|
||||||
|
$selected = 1;
|
||||||
|
}
|
||||||
|
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
// ID
|
// ID
|
||||||
if (!empty($arrayfields['p.rowid']['checked'])) {
|
if (!empty($arrayfields['p.rowid']['checked'])) {
|
||||||
print '<td class="tdoverflowmax50">';
|
print '<td class="tdoverflowmax50">';
|
||||||
@ -1292,15 +1317,17 @@ while ($i < min($num, $limit)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="nowrap center">';
|
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
print '<td class="nowrap center">';
|
||||||
$selected = 0;
|
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
if (in_array($obj->rowid, $arrayofselected)) {
|
$selected = 0;
|
||||||
$selected = 1;
|
if (in_array($obj->rowid, $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'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user