forked from Wavyzz/dolibarr
Debug webportal module
This commit is contained in:
@@ -7314,10 +7314,8 @@ abstract class CommonObject
|
||||
$out .= ajax_combobox($keyprefix.$key.$keysuffix, array(), 0);
|
||||
}
|
||||
|
||||
$out .= '<select class="flat '.$morecss.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" '.($moreparam ? $moreparam : '').'>';
|
||||
if ((!isset($this->fields[$key]['default'])) || ($this->fields[$key]['notnull'] != 1)) {
|
||||
$out .= '<option value="0"> </option>';
|
||||
}
|
||||
$tmpselect = '';
|
||||
$nbchoice = 0;
|
||||
foreach ($param['options'] as $keyb => $valb) {
|
||||
if ((string) $keyb == '') {
|
||||
continue;
|
||||
@@ -7325,11 +7323,18 @@ abstract class CommonObject
|
||||
if (strpos($valb, "|") !== false) {
|
||||
list($valb, $parent) = explode('|', $valb);
|
||||
}
|
||||
$out .= '<option value="'.$keyb.'"';
|
||||
$out .= (((string) $value == (string) $keyb) ? ' selected' : '');
|
||||
$out .= (!empty($parent) ? ' parent="'.$parent.'"' : '');
|
||||
$out .= '>'.$valb.'</option>';
|
||||
$nbchoice++;
|
||||
$tmpselect .= '<option value="'.$keyb.'"';
|
||||
$tmpselect .= (((string) $value == (string) $keyb) ? ' selected' : '');
|
||||
$tmpselect .= (!empty($parent) ? ' parent="'.$parent.'"' : '');
|
||||
$tmpselect .= '>'.$valb.'</option>';
|
||||
}
|
||||
|
||||
$out .= '<select class="flat '.$morecss.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" '.($moreparam ? $moreparam : '').'>';
|
||||
if ((!isset($this->fields[$key]['default'])) || ($this->fields[$key]['notnull'] != 1) || $nbchoice >= 2) {
|
||||
$out .= '<option value="0"> </option>';
|
||||
}
|
||||
$out .= $tmpselect;
|
||||
$out .= '</select>';
|
||||
} elseif ($type == 'sellist') {
|
||||
$out = '';
|
||||
|
||||
Reference in New Issue
Block a user