From 5679bdd5f6d7407c755707fb506b4f76ebcf257b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 26 Jun 2008 11:38:31 +0000 Subject: [PATCH] "allow to overwrite readonly settings of a cell" --- etemplate/inc/class.uietemplate.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index e97f798a21..9693a6b7a6 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -962,7 +962,8 @@ class etemplate extends boetemplate $value = $this->get_array($content,$name); $options = ''; - if ($readonly = $cell['readonly'] || @$readonlys[$name] && !is_array($readonlys[$name]) || $readonlys['__ALL__']) + if ($readonly = $cell['readonly'] && $readonlys[$name] !== false || // allow to overwrite readonly settings of a cell + @$readonlys[$name] && !is_array($readonlys[$name]) || $readonlys['__ALL__']) { $options .= ' readonly="readonly"'; } @@ -1084,7 +1085,6 @@ class etemplate extends boetemplate { $options = 'id="'.($cell['id'] ? $cell['id'] : $form_name).'" '.$options; } - switch ($type) { case 'label': // size: [b[old]][i[talic]],[link],[activate_links],[label_for],[link_target],[link_popup_size],[link_title] @@ -1422,7 +1422,6 @@ class etemplate extends boetemplate $multiple = 0; } $sels += $this->_sel_options($cell,$name,$content); - if ($multiple && !is_array($value)) $value = explode(',',$value); if ($readonly || $cell['noprint']) {