From 6b3eda15a6d41877e7b81f7454a0dd44af536f60 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 5 Mar 2005 14:56:30 +0000 Subject: [PATCH] fix to allow setting needed attribute for dates --- etemplate/inc/class.date_widget.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.date_widget.inc.php b/etemplate/inc/class.date_widget.inc.php index b47c8b7291..c435a3e704 100644 --- a/etemplate/inc/class.date_widget.inc.php +++ b/etemplate/inc/class.date_widget.inc.php @@ -188,6 +188,13 @@ unset($cell['size']); return True; } + if ($cell['needed']) + { + $GLOBALS['egw_info']['etemplate']['to_process'][$name] = array( + 'type' => 'ext-'.$type, + 'needed' => $cell['needed'], + ); + } $tpl =& new etemplate; $tpl->init('*** generated fields for date','','',0,'',0,0); // make an empty template // keep the editor away from the generated tmpls @@ -367,7 +374,7 @@ // checking the date is a correct one if (!checkdate($value['m'],$value['d'],$value['Y'])) { - $GLOBALS['phpgw_info']['etemplate']['validation_errors'][$name] = lang("'%1' is not a valid date !!!", + $GLOBALS['phpgw_info']['etemplate']['validation_errors'][$name] .= lang("'%1' is not a valid date !!!", $GLOBALS['phpgw']->common->dateformatorder($value['Y'],$value['m'],$value['d'],true)); } $data_format = $extension_data['data_format'];