"allow cancel buttons (no validation) to be named eg. button[cancel], instead only cancel"

This commit is contained in:
Ralf Becker 2007-11-24 18:59:46 +00:00
parent 3bbc80948f
commit d623adab6a

View File

@ -86,6 +86,12 @@
* @var string
*/
var $name_vars='exec';
/**
* Are we running as sitemgr module or not
*
* @var boolean
*/
var $sitemgr=false;
/**
* constructor of etemplate class, reads an eTemplate if $name is given
@ -1267,7 +1273,7 @@ foreach($sess as $key => $val)
if (!$readonly && $type != 'buttononly') // input button, are never submitted back!
{
$GLOBALS['egw_info']['etemplate']['to_process'][$form_name] = $cell['type'];
if (strtolower($name) == 'cancel')
if ($name == 'cancel' || stripos($name,'[cancel]') !== false)
{
$GLOBALS['egw_info']['etemplate']['to_process'][$form_name] = 'cancel';
}