forked from extern/egroupware
2 small bugfixes:
- default values for readonly checkboxes (x) get set now, even if checked and unchecked values are specified (but no readonly values) - fixed readonly case of option values for selectboxes with label+title (value is an array with keys label+title)
This commit is contained in:
parent
fc5d6daee4
commit
90e7bd7595
@ -828,7 +828,7 @@
|
||||
list($true_val,$false_val,$ro_true,$ro_false) = explode(',',$cell_options);
|
||||
$value = $value == $true_val;
|
||||
}
|
||||
else
|
||||
if (count(explode(',',$cell_options)) < 3)
|
||||
{
|
||||
$ro_true = 'x';
|
||||
$ro_false = '';
|
||||
@ -1074,16 +1074,30 @@
|
||||
if ($multiple && !is_array($value)) $value = explode(',',$value);
|
||||
if ($readonly)
|
||||
{
|
||||
if ($multiple)
|
||||
foreach($multiple ? $value : array($value) as $val)
|
||||
{
|
||||
foreach($multiple ? $value : array($value) as $val)
|
||||
if (is_array($sels[$val]))
|
||||
{
|
||||
$html .= ($html?"<br>\n":'').$this->html->htmlspecialchars($cell['no_lang'] ? $sels[$val] : lang($sels[$val]));
|
||||
$option_label = $sels[$val]['label'];
|
||||
$option_title = $sels[$val]['title'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$option_label = $sels[$val];
|
||||
$option_title = '';
|
||||
}
|
||||
if (!$cell['no_lang']) $option_label = lang($option_label);
|
||||
|
||||
if ($html) $html .= "<br>\n";
|
||||
|
||||
if ($option_title)
|
||||
{
|
||||
$html .= '<span title="'.$this->html->htmlspecialchars($option_title).'">'.$this->html->htmlspecialchars($option_label).'</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$html .= $this->html->htmlspecialchars($option_label);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$html .= $this->html->htmlspecialchars($cell['no_lang'] ? $sels[$value] : lang($sels[$value]));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user