Look and feel v18

This commit is contained in:
Laurent Destailleur
2023-04-24 02:07:20 +02:00
parent 586d9f5ba7
commit fc04299f88
5 changed files with 12 additions and 6 deletions

View File

@@ -51,7 +51,7 @@ class FormAdmin
* @param string $htmlname Name of HTML select
* @param int $showauto Show 'auto' choice
* @param array $filter Array of keys to exclude in list (opposite of $onlykeys)
* @param string $showempty '1'=Add empty value or 'string to show'
* @param int|string $showempty '1'=Add empty value or 'string to show'
* @param int $showwarning Show a warning if language is not complete
* @param int $disabled Disable edit of select
* @param string $morecss Add more css styles
@@ -93,7 +93,11 @@ class FormAdmin
$out .= '<select '.($multiselect ? 'multiple="multiple" ' : '').'class="flat'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.($multiselect ? '[]' : '').'"'.($disabled ? ' disabled' : '').'>';
if ($showempty && !$multiselect) {
$out .= '<option value="0"';
if (is_numeric($showempty)) {
$out .= '<option value="0"';
} else {
$out .= '<option value="-1"';
}
if ($selected === '') {
$out .= ' selected';
}