From e3ff7b9569900420fdfe797b75a0ef685bccf7a1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 30 Apr 2006 07:20:12 +0000 Subject: [PATCH] radio button allow now to set the displayed readonly values to something different then X and empty --- etemplate/inc/class.uietemplate.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index 220d2eebac..03ffd610a6 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -1013,8 +1013,9 @@ if (!$multiple) unset($set_val); // otherwise it will be added to the label } break; - case 'radio': // size: value if checked - $set_val = $this->expand_name($cell_options,$show_c,$show_row,$content['.c'],$content['.row'],$content); + case 'radio': // size: value if checked, readonly set, readonly unset + list($set_val,$ro_true,$ro_false) = explode(',',$cell_options); + $set_val = $this->expand_name($set_val,$show_c,$show_row,$content['.c'],$content['.row'],$content); if ($value == $set_val) { @@ -1025,7 +1026,8 @@ if ($readonly) { - $html .= $value == $set_val ? $this->html->bold('x') : ''; + if (!$ro_true && !$ro_false) $ro_true = 'x'; + $html .= $value == $set_val ? $this->html->bold($ro_true) : $ro_false; } else {