Merge pull request #20796 from altairis-melina/transradio
FIX: size and translations of radio buttons
This commit is contained in:
commit
b416c49348
@ -956,6 +956,8 @@ class ExtraFields
|
||||
$morecss = 'minwidth400';
|
||||
} elseif ($type == 'boolean') {
|
||||
$morecss = '';
|
||||
} elseif ($type == 'radio') {
|
||||
$morecss = 'width25';
|
||||
} else {
|
||||
if (empty($size) || round($size) < 12) {
|
||||
$morecss = 'minwidth100';
|
||||
@ -1262,7 +1264,7 @@ class ExtraFields
|
||||
$out .= ' value="'.$keyopt.'"';
|
||||
$out .= ' id="'.$keyprefix.$key.$keysuffix.'_'.$keyopt.'"';
|
||||
$out .= ($value == $keyopt ? 'checked' : '');
|
||||
$out .= '/><label for="'.$keyprefix.$key.$keysuffix.'_'.$keyopt.'">'.$val.'</label><br>';
|
||||
$out .= '/><label for="'.$keyprefix.$key.$keysuffix.'_'.$keyopt.'">'.$langs->trans($val).'</label><br>';
|
||||
}
|
||||
} elseif ($type == 'chkbxlst') {
|
||||
if (is_array($value)) {
|
||||
@ -1666,7 +1668,7 @@ class ExtraFields
|
||||
dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
|
||||
}
|
||||
} elseif ($type == 'radio') {
|
||||
$value = $param['options'][$value];
|
||||
$value = $langs->trans($param['options'][$value]);
|
||||
} elseif ($type == 'checkbox') {
|
||||
$value_arr = explode(',', $value);
|
||||
$value = '';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user