diff --git a/phpgwapi/inc/class.uiaccountsel.inc.php b/phpgwapi/inc/class.uiaccountsel.inc.php index 821c5a56c1..330e7be104 100644 --- a/phpgwapi/inc/class.uiaccountsel.inc.php +++ b/phpgwapi/inc/class.uiaccountsel.inc.php @@ -147,14 +147,15 @@ $selected = array_keys($selected); } // add necessary popup trigers - $popup = "window.open('".$GLOBALS['phpgw']->link('/index.php',array( + $link = $GLOBALS['phpgw']->link('/index.php',array( 'menuaction' => 'phpgwapi.uiaccountsel.popup', 'app' => $GLOBALS['phpgw_info']['flags']['currentapp'], 'element_id' => $element_id, - ))."','Search','width=800,height=600,toolbar=no,scrollbars=yes,resizable=yes')"; + )); if (!$lines) { - $options .= ' onchange="if (this.value=\'popup\') '.$popup.';'.($onchange?" else {$onchange}":'').'"'; + $options .= ' onchange="if (this.value=\'popup\') '."window.open('$link','uiaccountsel','width=800,height=600,toolbar=no,scrollbars=yes,resizable=yes')".';'. + ($onchange ? " else {$onchange}" : '' ).'"'; $select['popup'] = lang('Search').' ...'; } elseif ($onchange) @@ -166,12 +167,13 @@ if ($lines > 1 && ($this->account_selection == 'popup' || $this->account_selection == 'primary_group')) { - $html .= $GLOBALS['phpgw']->html->image('calendar','multi_3',lang('click to select or search accounts'),' onclick="'.$popup.';" style="cursor: pointer; cursor: hand;"'); + $html .= ''. + $GLOBALS['phpgw']->html->image('calendar','multi_3',lang('click to select or search accounts')).''; } if(!$GLOBALS['phpgw_info']['flags']['uiaccountsel']['addOption_installed']) { - $html .= '