From bd460d0ea1477a0318e067cda25e7ddfa9971838 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 5 Feb 2004 13:27:20 +0000 Subject: [PATCH] fixed readonly display --- etemplate/inc/class.date_widget.inc.php | 1 + etemplate/inc/class.link_widget.inc.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/etemplate/inc/class.date_widget.inc.php b/etemplate/inc/class.date_widget.inc.php index b631dda549..add82c35a5 100644 --- a/etemplate/inc/class.date_widget.inc.php +++ b/etemplate/inc/class.date_widget.inc.php @@ -126,6 +126,7 @@ $cell['no_lang'] = True; $cell['label'] = strlen($cell['label']) > 1 ? lang($cell['label']) : $cell['label']; } + unset($cell['size']); return True; } $tpl = new etemplate; diff --git a/etemplate/inc/class.link_widget.inc.php b/etemplate/inc/class.link_widget.inc.php index 8622a8c559..86005ead3b 100644 --- a/etemplate/inc/class.link_widget.inc.php +++ b/etemplate/inc/class.link_widget.inc.php @@ -41,6 +41,12 @@ function pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl) { + if ($cell['type'] == 'link-to' && ($cell['readonly'] || $readonlys)) + { + // readonly ==> omit the whole widget + $cell = $tmpl->empty_cell(); + return; + } if ($cell['type'] == 'link-string') { $str = '';