diff --git a/admin/inc/class.uiaccounts.inc.php b/admin/inc/class.uiaccounts.inc.php index 0e3ac86065..1d0a8f4b17 100755 --- a/admin/inc/class.uiaccounts.inc.php +++ b/admin/inc/class.uiaccounts.inc.php @@ -48,9 +48,14 @@ function list_groups() { - if ($GLOBALS['phpgw']->acl->check('group_access',1,'admin')) + if ($_POST['done'] || $GLOBALS['phpgw']->acl->check('group_access',1,'admin')) { - $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.mainscreen')); + $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uimainscreen.mainscreen'); + } + + if($_POST['add']) + { + $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiaccounts.edit_group'); } $query = (isset($_POST['query'])?$_POST['query']:''); @@ -109,10 +114,9 @@ ( 'lang_add' => lang('add'), 'lang_add_statustext' => lang('add a group'), - 'add_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.edit_group'), + 'action_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'), 'lang_done' => lang('done'), 'lang_done_statustext' => lang('return to admin mainscreen'), - 'done_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.mainscreen'), 'add_access' => ($this->bo->check_rights('add')?'yes':''), ); @@ -139,9 +143,14 @@ function list_users($param_cd='') { - if ($GLOBALS['phpgw']->acl->check('account_access',1,'admin')) + if ($_POST['done'] || $GLOBALS['phpgw']->acl->check('account_access',1,'admin')) { - $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.mainscreen')); + $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uimainscreen.mainscreen'); + } + + if ($_POST['add']) + { + $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiaccounts.edit_user'); } if($param_cd) @@ -244,10 +253,9 @@ ( 'lang_add' => lang('add'), 'lang_add_statustext' => lang('add a user'), - 'add_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.edit_user'), + 'action_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_users'), 'lang_done' => lang('done'), 'lang_done_statustext' => lang('return to admin mainscreen'), - 'done_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.mainscreen'), 'add_access' => ($this->bo->check_rights('add','account_access')?'yes':''), ); @@ -307,21 +315,14 @@ else { $this->bo->add_group($values); - Header('Location: ' . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups')); + $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiaccounts.list_groups'); } } } - if (!$account_id && $GLOBALS['phpgw']->acl->check('group_access',4,'admin')) + if ($values['cancel'] || (!$account_id && $GLOBALS['phpgw']->acl->check('group_access',4,'admin')) || ($account_id && $GLOBALS['phpgw']->acl->check('group_access',16,'admin'))) { - $this->list_groups(); - return False; - } - - if ($account_id && $GLOBALS['phpgw']->acl->check('group_access',16,'admin')) - { - $this->list_groups(); - return False; + $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiaccounts.list_groups'); } $cdid = $cd; @@ -446,7 +447,6 @@ $data = array ( 'edit_url' => $GLOBALS['phpgw']->link('/index.php',$link_data), - 'cancel_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'), 'account_id' => $group_info['account_id'], 'lang_account_name' => lang('group name'), 'value_account_name' => $group_info['account_name'], @@ -888,17 +888,15 @@ { $account_id = get_var('account_id',array('POST','GET')); - if ($GLOBALS['phpgw']->acl->check('group_access',32,'admin')) + if ($_POST['cancel'] || $GLOBALS['phpgw']->acl->check('group_access',32,'admin')) { - $this->list_groups(); - return False; + $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiaccounts.list_groups'); } - if ($account_id && get_var('confirm',array('POST'))) + if ($account_id && $_POST['delete']) { $this->bo->delete_group($account_id); - $this->list_groups(); - return False; + $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiaccounts.list_groups'); } $GLOBALS['phpgw']->xslttpl->add_file(array('app_data',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 'app_delete')); @@ -906,13 +904,12 @@ $data = array ( - 'delete_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.delete_group&account_id=' . $account_id), - 'done_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'), - 'lang_yes' => lang('Yes'), - 'lang_no' => lang('No'), - 'lang_yes_statustext' => lang('Delete the entry'), - 'lang_no_statustext' => lang('Back to the list'), - 'lang_error_msg' => lang('are you sure you want to delete this group ?') + 'delete_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.delete_group&account_id=' . $account_id), + 'lang_delete' => lang('delete'), + 'lang_cancel' => lang('cancel'), + 'lang_delete_statustext' => lang('delete the group'), + 'lang_cancel_statustext' => lang('Leave the group untouched and return back to the list'), + 'lang_delete_msg' => lang('are you sure you want to delete this group ?') ); $old_group_list = $GLOBALS['phpgw']->acl->get_ids_for_location(intval($account_id),1,'phpgw_group'); diff --git a/admin/templates/default/groups.xsl b/admin/templates/default/groups.xsl index 554c653d56..bcec655a6f 100644 --- a/admin/templates/default/groups.xsl +++ b/admin/templates/default/groups.xsl @@ -83,39 +83,34 @@ - - + + +
+ - - - - - - window.status=' - - '; return true; - - - + + + + window.status=' + + '; return true; + +
- - - - - -
- - - window.status=' - - '; return true; - - -
+ + + + + window.status=' + + '; return true; + + +
@@ -176,21 +171,16 @@ - + + + + + - - - -
- - - -
- diff --git a/admin/templates/default/users.xsl b/admin/templates/default/users.xsl index da7fdd3cf3..3ae5d622fb 100644 --- a/admin/templates/default/users.xsl +++ b/admin/templates/default/users.xsl @@ -95,40 +95,35 @@ - - - - - - -
- - - window.status=' - - '; return true; - - -
-
-
- - - - - - -
- + + + + + + + + window.status=' - + '; return true; - - - + +
+ + + + + + window.status=' + + '; return true; + + + + +
diff --git a/phpgwapi/templates/default/app_delete.xsl b/phpgwapi/templates/default/app_delete.xsl index 2fe992d06d..36a0198f09 100644 --- a/phpgwapi/templates/default/app_delete.xsl +++ b/phpgwapi/templates/default/app_delete.xsl @@ -14,7 +14,7 @@ - + @@ -74,30 +74,29 @@ + +
- - - - - - window.status=' - - '; return true; - - -
- - - - + + window.status=' - + '; return true; - - + + + + + + window.status=' + + '; return true; + + + + diff --git a/phpgwapi/templates/default/msgbox.xsl b/phpgwapi/templates/default/msgbox.xsl index 4789e8a6a1..38a247593f 100644 --- a/phpgwapi/templates/default/msgbox.xsl +++ b/phpgwapi/templates/default/msgbox.xsl @@ -8,15 +8,19 @@ diff --git a/phpgwapi/templates/default/phpgw_header.xsl b/phpgwapi/templates/default/phpgw_header.xsl index 0e0dffb49c..1a3f4afd42 100644 --- a/phpgwapi/templates/default/phpgw_header.xsl +++ b/phpgwapi/templates/default/phpgw_header.xsl @@ -50,7 +50,7 @@
- - - {$msgbox_img_alt} - - window.status=' - - '; return true; - - + + + + + {$msgbox_img_alt} + + window.status=' + + '; return true; + +   + +
- + window.status='