Merge pull request #23043 from ibuiv/patch-4
Fix #22494 Bad error message and trans missing (radio button)
This commit is contained in:
commit
ad8546038f
@ -10,6 +10,7 @@
|
|||||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||||
|
* Copyright (C) 2022 Antonin MARCHAL <antonin@letempledujeu.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1709,7 +1710,12 @@ class ExtraFields
|
|||||||
dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
|
dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
|
||||||
}
|
}
|
||||||
} elseif ($type == 'radio') {
|
} elseif ($type == 'radio') {
|
||||||
|
if (!isset($param['options'][$value])) {
|
||||||
|
$langs->load('errors');
|
||||||
|
$value = $langs->trans('ErrorNoValueForRadioType');
|
||||||
|
} else {
|
||||||
$value = $langs->trans($param['options'][$value]);
|
$value = $langs->trans($param['options'][$value]);
|
||||||
|
}
|
||||||
} elseif ($type == 'checkbox') {
|
} elseif ($type == 'checkbox') {
|
||||||
$value_arr = explode(',', $value);
|
$value_arr = explode(',', $value);
|
||||||
$value = '';
|
$value = '';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user