render only text-widgets with size < 0 as readonly input

This commit is contained in:
Ralf Becker 2006-12-25 17:43:59 +00:00
parent 600c807dfd
commit a999bb4ef4

View File

@ -954,14 +954,15 @@
case 'passwd' :
case 'text': // size: [length][,maxLength[,preg]]
$cell_opts = explode(',',$cell_options,3);
if ($readonly && !$cell_opts[0])
if ($readonly && (int)$cell_opts[0] >= 0)
{
$html .= strlen($value) ? $this->html->bold($this->html->htmlspecialchars($value)) : '';
}
else
{
if ($cell_opts[0] < 0) $cell_opts[0] = abs($cell_opts[0]);
$html .= $this->html->input($form_name,$value,$type == 'passwd' ? 'password' : '',
$options.$this->html->formatOptions($cell_options,'SIZE,MAXLENGTH'));
$options.$this->html->formatOptions($cell_opts,'SIZE,MAXLENGTH'));
if (!$readonly)
{