This commit is contained in:
ceb 2003-04-27 19:28:13 +00:00
parent 996ae97971
commit 0349874425
6 changed files with 112 additions and 127 deletions

View File

@ -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');

View File

@ -83,39 +83,34 @@
<!-- BEGIN group_add -->
<xsl:template match="group_add">
<tr>
<td height="50" valign="bottom">
<tr height="50">
<xsl:variable name="action_url"><xsl:value-of select="action_url"/></xsl:variable>
<form method="post" action="{$action_url}">
<td valign="bottom">
<xsl:choose>
<xsl:when test="add_access = 'yes'">
<xsl:variable name="add_url"><xsl:value-of select="add_url"/></xsl:variable>
<xsl:variable name="lang_add"><xsl:value-of select="lang_add"/></xsl:variable>
<form method="post" action="{$add_url}">
<input type="submit" name="add" value="{$lang_add}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_add_statustext"/>
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
</form>
<xsl:variable name="lang_add"><xsl:value-of select="lang_add"/></xsl:variable>
<input type="submit" name="add" value="{$lang_add}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_add_statustext"/>
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
</xsl:when>
</xsl:choose>
</td>
</tr>
<tr>
<td height="50" valign="bottom">
<xsl:variable name="done_url"><xsl:value-of select="done_url"/></xsl:variable>
<xsl:variable name="lang_done"><xsl:value-of select="lang_done"/></xsl:variable>
<form method="post" action="{$done_url}">
<input type="submit" name="done" value="{$lang_done}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_done_statustext"/>
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
</form>
<td align="right" valign="bottom" colspan="2">
<xsl:variable name="lang_done"><xsl:value-of select="lang_done"/></xsl:variable>
<input type="submit" name="done" value="{$lang_done}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_done_statustext"/>
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
</td>
</form>
</tr>
</xsl:template>
@ -176,21 +171,16 @@
</td>
</tr>
<tr>
<td colspan="2" align="left">
<td>
<xsl:variable name="lang_save"><xsl:value-of select="lang_save"/></xsl:variable>
<input type="submit" name="values[save]" value="{$lang_save}"/>
</td>
<td align="right">
<xsl:variable name="lang_cancel"><xsl:value-of select="lang_cancel"/></xsl:variable>
<input type="submit" name="values[cancel]" value="{$lang_cancel}"/>
</td>
</tr>
</form>
<tr>
<xsl:variable name="cancel_url"><xsl:value-of select="cancel_url"/></xsl:variable>
<xsl:variable name="lang_cancel"><xsl:value-of select="lang_cancel"/></xsl:variable>
<form method="POST" action="{$cancel_url}">
<td align="left">
<input type="submit" name="cancel" value="{$lang_cancel}"/>
</td>
</form>
</tr>
</table>
</td>
</tr>

View File

@ -95,40 +95,35 @@
<!-- BEGIN user_add -->
<xsl:template match="user_add">
<tr>
<td height="50" valign="bottom">
<xsl:choose>
<xsl:when test="add_access = 'yes'">
<xsl:variable name="add_url"><xsl:value-of select="add_url"/></xsl:variable>
<xsl:variable name="lang_add"><xsl:value-of select="lang_add"/></xsl:variable>
<form method="post" action="{$add_url}">
<input type="submit" name="add" value="{$lang_add}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_add_statustext"/>
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
</form>
</xsl:when>
</xsl:choose>
</td>
</tr>
<tr>
<td height="50" valign="bottom">
<xsl:variable name="done_url"><xsl:value-of select="done_url"/></xsl:variable>
<xsl:variable name="lang_done"><xsl:value-of select="lang_done"/></xsl:variable>
<form method="post" action="{$done_url}">
<input type="submit" name="done" value="{$lang_done}" onMouseout="window.status='';return true;">
<tr height="50">
<xsl:variable name="action_url"><xsl:value-of select="action_url"/></xsl:variable>
<form method="post" action="{$action_url}">
<td valign="bottom" colspan="3">
<xsl:choose>
<xsl:when test="add_access = 'yes'">
<xsl:variable name="lang_add"><xsl:value-of select="lang_add"/></xsl:variable>
<input type="submit" name="add" value="{$lang_add}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_done_statustext"/>
<xsl:value-of select="lang_add_statustext"/>
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
</form>
</td>
</tr>
</xsl:when>
</xsl:choose>
</td>
<td align="right" valign="bottom" colspan="3">
<xsl:variable name="lang_done"><xsl:value-of select="lang_done"/></xsl:variable>
<input type="submit" name="done" value="{$lang_done}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_done_statustext"/>
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
</td>
</form>
</tr>
</xsl:template>
<!-- END user_list -->

View File

@ -14,7 +14,7 @@
</xsl:when>
</xsl:choose>
<tr>
<td align="center" colspan="2" class="row_on"><xsl:value-of select="lang_confirm_msg"/></td>
<td align="center" colspan="2" class="row_on"><xsl:value-of select="lang_delete_msg"/></td>
</tr>
<!-- delete sub -->
@ -74,30 +74,29 @@
</xsl:choose>
<tr>
<xsl:variable name="delete_url"><xsl:value-of select="delete_url"/></xsl:variable>
<form method="POST" action="{$delete_url}">
<td>
<xsl:variable name="delete_url"><xsl:value-of select="delete_url"/></xsl:variable>
<xsl:variable name="lang_yes"><xsl:value-of select="lang_yes"/></xsl:variable>
<form method="POST" action="{$delete_url}">
<input type="submit" name="confirm" value="{$lang_yes}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_yes_statustext"/>
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
</form>
</td>
<td align="right">
<xsl:variable name="done_url"><xsl:value-of select="done_url"/></xsl:variable>
<a href="{$done_url}" onMouseout="window.status='';return true;">
<xsl:variable name="lang_delete"><xsl:value-of select="lang_delete"/></xsl:variable>
<input type="submit" name="delete" value="{$lang_delete}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_no_statustext"/>
<xsl:value-of select="lang_yes_statustext"/>
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
<xsl:value-of select="lang_no"/>
</a>
</input>
</td>
<td align="right">
<xsl:variable name="lang_cancel"><xsl:value-of select="lang_cancel"/></xsl:variable>
<input type="submit" name="cancel" value="{$lang_cancel}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_cancel_statustext"/>
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
</td>
</form>
</tr>
</table>
</xsl:template>

View File

@ -8,15 +8,19 @@
<table cellpadding="2" cellspacing="0" align="center" class="msgbox">
<tr>
<td align="center" valign="middle">
<xsl:variable name="msgbox_img"><xsl:value-of select="msgbox_img"/></xsl:variable>
<xsl:variable name="msgbox_img_alt"><xsl:value-of select="msgbox_img_alt"/></xsl:variable>
<img src="{$msgbox_img}" alt="{$msgbox_img_alt}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_msgbox_statustext"/>
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</img><xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="msgbox_img != ''">
<xsl:variable name="msgbox_img"><xsl:value-of select="msgbox_img"/></xsl:variable>
<xsl:variable name="msgbox_img_alt"><xsl:value-of select="msgbox_img_alt"/></xsl:variable>
<img src="{$msgbox_img}" alt="{$msgbox_img_alt}" title="{$msgbox_img_alt}" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_msgbox_statustext"/>
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</img><xsl:text>&nbsp;</xsl:text>
</xsl:when>
</xsl:choose>
<xsl:value-of disable-output-escaping="yes" select="msgbox_text"/>
</td>
</tr>

View File

@ -50,7 +50,7 @@
<td align="center" valign="bottom" class="bottom">
<!-- BEGIN bottom_part -->
<xsl:value-of select="lang_powered_by"/>
<a href="http://www.phpgroupware.org" target="blank" onMouseout="window.status='';return true;">
<a href="http://www.phpgroupware.org" target="blank" onMouseout="window.status='';return true;" class="bottom">
<xsl:attribute name="onMouseover">
<xsl:text>window.status='</xsl:text>
<xsl:value-of select="lang_phpgw_statustext"/>