From 2ed91ce075bcd24fea0a75dcfaaca0a0a99b4351 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 7 May 2007 19:03:33 +0000 Subject: [PATCH] fix for bug #674: no more simple multiple participant selection --- etemplate/inc/class.select_widget.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.select_widget.inc.php b/etemplate/inc/class.select_widget.inc.php index de4b641a3e..3fa4a1a805 100644 --- a/etemplate/inc/class.select_widget.inc.php +++ b/etemplate/inc/class.select_widget.inc.php @@ -211,7 +211,7 @@ $cell['no_lang'] = True; break; - case 'select-account': // options: #rows,{accounts(default)|both|groups|owngroups},{0(=lid)|1(default=name)|2(=lid+name))} + case 'select-account': // options: #rows,{accounts(default)|both|groups|owngroups},{0(=lid)|1(default=name)|2(=lid+name),expand-multiselect-rows)} //echo "

select-account widget: name=$cell[name], type='$type', rows=$rows, readonly=".(int)($cell['readonly'] || $readonlys)."

\n"; if($type == 'owngroups') { @@ -233,7 +233,8 @@ { if (!is_object($GLOBALS['egw']->uiaccountsel)) { - $GLOBALS['egw']->uiaccountsel =& CreateObject('phpgwapi.uiaccountsel'); + require_once(EGW_API_INC.'/class.uiaccountsel.inc.php'); + $GLOBALS['egw']->uiaccountsel =& new uiaccountsel; } $help = (int)$cell['no_lang'] < 2 ? lang($cell['help']) : $cell['help']; $onFocus = "self.status='".addslashes(htmlspecialchars($help))."'; return true;"; @@ -247,8 +248,9 @@ $onlyPrint = $onlyPrint ? implode('
',$onlyPrint) : lang((int)$rows < 0 ? 'all' : $rows); $noPrint_class = ' class="noPrint"'; } + if (($rows > 0 || $type3) && substr($name,-2) != '[]') $name .= '[]'; $value = $GLOBALS['egw']->uiaccountsel->selection($name,'eT_accountsel_'.str_replace(array('[','][',']'),array('_','_',''),$name), - $value,$type,$rows > 0 ? $rows : 0,False,' onfocus="'.$onFocus.'" onblur="'.$onBlur.'"'.$noPrint_class, + $value,$type,$rows > 0 ? $rows : ($type3 ? -$type3 : 0),False,' onfocus="'.$onFocus.'" onblur="'.$onBlur.'"'.$noPrint_class, $cell['onchange'] == '1' ? 'this.form.submit();' : $cell['onchange'], !empty($rows) && 0+$rows <= 0 ? lang($rows < 0 ? 'all' : $rows) : False); if ($cell['noprint'])