fix: categorie display if none
This commit is contained in:
parent
cffee1df4b
commit
89ba133c61
@ -354,13 +354,14 @@ if ($action == 'edit') {
|
|||||||
$result = $c->fetch($conf->global->{$constname});
|
$result = $c->fetch($conf->global->{$constname});
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages(null, $c->errors, 'errors');
|
setEventMessages(null, $c->errors, 'errors');
|
||||||
|
} elseif ($result > 0 ) {
|
||||||
|
$ways = $c->print_all_ways(' >> ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text
|
||||||
|
$toprint = array();
|
||||||
|
foreach ($ways as $way) {
|
||||||
|
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . $way . '</li>';
|
||||||
|
}
|
||||||
|
print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>';
|
||||||
}
|
}
|
||||||
$ways = $c->print_all_ways(' >> ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text
|
|
||||||
$toprint = array();
|
|
||||||
foreach ($ways as $way) {
|
|
||||||
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . $way . '</li>';
|
|
||||||
}
|
|
||||||
print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>';
|
|
||||||
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
|
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
|
||||||
if ($conf->global->{$constname}==2) {
|
if ($conf->global->{$constname}==2) {
|
||||||
print $langs->trans("Prospect");
|
print $langs->trans("Prospect");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user