mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
Fix checkboxes using defaults not returning boolean
This commit is contained in:
parent
80ae80098e
commit
a05ac6fa11
@ -61,8 +61,8 @@ class etemplate_widget_checkbox extends etemplate_widget
|
||||
// defaults for set and unset values
|
||||
if (!$this->attrs['set_val'] && !$this->attrs['unset_val'])
|
||||
{
|
||||
$set_val = 'true';
|
||||
$unset_val = 'false';
|
||||
$set_val = true;
|
||||
$unset_val = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -92,6 +92,11 @@ class etemplate_widget_checkbox extends etemplate_widget
|
||||
{
|
||||
if (!isset($valid)) $valid = array();
|
||||
}
|
||||
elseif ($value === 'true')
|
||||
{
|
||||
// 'true' != true
|
||||
$valid = $set_val;
|
||||
}
|
||||
else
|
||||
{
|
||||
$valid = $unset_val;
|
||||
|
Loading…
Reference in New Issue
Block a user