mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 00:09:13 +01:00
update
This commit is contained in:
parent
2f282b71ca
commit
bde09a37ec
@ -100,7 +100,7 @@
|
||||
|
||||
if ($_POST['done'])
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.iumainscreen.mainscreen');
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uimainscreen.mainscreen');
|
||||
}
|
||||
|
||||
if ($GLOBALS['appname'])
|
||||
@ -369,7 +369,7 @@
|
||||
'global_cats' => $global_cats
|
||||
);
|
||||
|
||||
if ($_POST['cancel'] || !$this->cat_id)
|
||||
if ($_POST['done'] || $_POST['cancel'] || !$this->cat_id)
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
|
||||
}
|
||||
@ -389,7 +389,9 @@
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
|
||||
break;
|
||||
default:
|
||||
$error_msg = lang('Please choose one of the methods to handle the subcategories');
|
||||
$error = array('Please choose one of the methods to handle the subcategories');
|
||||
$msgbox_error = $GLOBALS['phpgw']->common->error_list($error);
|
||||
$show_done = 'yes';
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -411,12 +413,14 @@
|
||||
'cat_id' => $this->cat_id));
|
||||
if ($apps_cats)
|
||||
{
|
||||
$lang_confirm_msg = lang('This category is currently being used by applications as a parent category. ')
|
||||
. lang('You will need to reassign these subcategories before you can delete this category');
|
||||
$error = array('This category is currently being used by applications as a parent category',
|
||||
'You will need to reassign these subcategories before you can delete this category');
|
||||
|
||||
$msgbox_error = $GLOBALS['phpgw']->common->error_list($error);
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang_confirm_msg = lang('Are you sure you want to delete this global category ?');
|
||||
$confirm_msg = lang('Are you sure you want to delete this global category ?');
|
||||
|
||||
$exists = $this->bo->exists(array
|
||||
(
|
||||
@ -435,15 +439,18 @@
|
||||
|
||||
$data = array
|
||||
(
|
||||
'lang_delete_msg' => $lang_confirm_msg,
|
||||
'show_done' => $show_done,
|
||||
'msgbox_data' => $msgbox_error,
|
||||
'lang_delete' => lang('delete'),
|
||||
'subs' => $subs,
|
||||
'lang_sub_select_move' => $lang_sub_select_move,
|
||||
'lang_sub_select_drop' => $lang_sub_select_drop,
|
||||
'lang_delete_statustext' => lang('delete the category'),
|
||||
'lang_cancel_statustext' => lang('do NOT delete the category and return back to the list'),
|
||||
'lang_done_statustext' => lang('back to the list'),
|
||||
'lang_cancel' => lang('cancel'),
|
||||
'lang_error_msg' => $error_msg
|
||||
'lang_done' => lang('done'),
|
||||
'lang_confirm_msg' => $confirm_msg
|
||||
);
|
||||
|
||||
$link_data['menuaction'] = 'admin.uicategories.delete';
|
||||
|
@ -7,17 +7,20 @@
|
||||
<xsl:template match="delete">
|
||||
<table cellpadding="2" cellspacing="2" align="center">
|
||||
<xsl:choose>
|
||||
<xsl:when test="lang_error_msg != ''">
|
||||
<tr class="row_off">
|
||||
<td align="center" colspan="2"><xsl:value-of select="lang_error_msg"/></td>
|
||||
<xsl:when test="msgbox_data != ''">
|
||||
<tr>
|
||||
<td align="center" colspan="2"><xsl:call-template name="msgbox"/></td>
|
||||
</tr>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<tr>
|
||||
<td align="center" colspan="2" class="row_on"><xsl:value-of select="lang_delete_msg"/></td>
|
||||
<td align="center" colspan="2"><xsl:value-of select="lang_confirm_msg"/></td>
|
||||
</tr>
|
||||
|
||||
<!-- delete sub -->
|
||||
|
||||
<xsl:variable name="delete_url"><xsl:value-of select="delete_url"/></xsl:variable>
|
||||
<form method="POST" action="{$delete_url}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="subs = 'yes'">
|
||||
<tr>
|
||||
@ -72,16 +75,27 @@
|
||||
</tr>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
|
||||
<tr>
|
||||
<xsl:variable name="delete_url"><xsl:value-of select="delete_url"/></xsl:variable>
|
||||
<form method="POST" action="{$delete_url}">
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="show_done != ''">
|
||||
<xsl:variable name="lang_done"><xsl:value-of select="lang_done"/></xsl:variable>
|
||||
<td>
|
||||
<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>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:variable name="lang_delete"><xsl:value-of select="lang_delete"/></xsl:variable>
|
||||
<td>
|
||||
<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_yes_statustext"/>
|
||||
<xsl:value-of select="lang_delete_statustext"/>
|
||||
<xsl:text>'; return true;</xsl:text>
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
@ -96,8 +110,10 @@
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
</td>
|
||||
</form>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user