Skip to content

Commit 21bfe17

Browse files
committed
Add show_delete_on_forms check to the other 3 new delete buttons
1 parent 246da68 commit 21bfe17

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

interface/web/mail/mail_alias_edit.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ function onShowEnd() {
9292
$app->tpl->setVar('_csrf_id', $csrf_token['csrf_id']);
9393
$app->tpl->setVar('_csrf_key', $csrf_token['csrf_key']);
9494

95+
$global_config = $app->getconf->get_global_config();
96+
$app->tpl->setVar('show_delete_on_forms', $global_config['misc']['show_delete_on_forms']);
97+
9598
parent::onShowEnd();
9699
}
97100

interface/web/mail/mail_forward_edit.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ function onShowEnd() {
9090
$app->tpl->setVar('_csrf_id', $csrf_token['csrf_id']);
9191
$app->tpl->setVar('_csrf_key', $csrf_token['csrf_key']);
9292

93+
$global_config = $app->getconf->get_global_config();
94+
$app->tpl->setVar('show_delete_on_forms', $global_config['misc']['show_delete_on_forms']);
95+
9396
parent::onShowEnd();
9497
}
9598

interface/web/mail/mail_user_edit.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ function onShowEnd() {
139139
$app->tpl->setVar('_csrf_id', $csrf_token['csrf_id']);
140140
$app->tpl->setVar('_csrf_key', $csrf_token['csrf_key']);
141141

142+
$global_config = $app->getconf->get_global_config();
143+
$app->tpl->setVar('show_delete_on_forms', $global_config['misc']['show_delete_on_forms']);
144+
142145
parent::onShowEnd();
143146
}
144147

interface/web/mail/templates/mail_alias_edit.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
<input type="hidden" name="type" value="alias">
4040

4141
<div class="clear">
42-
<tmpl_if name='id'>
42+
<tmpl_if name='id'><tmpl_if name='show_delete_on_forms' op="==" value="y">
4343
<a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('mail/mail_alias_del.php?id={tmpl_var name='id'}&_csrf_id={tmpl_var name='_csrf_id'}&_csrf_key={tmpl_var name='_csrf_key'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a>
44-
</tmpl_if>
44+
</tmpl_if></tmpl_if>
4545
<div class="right">
4646
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="mail/mail_alias_edit.php">{tmpl_var name='btn_save_txt'}</button>
4747
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="mail/mail_alias_list.php">{tmpl_var name='btn_cancel_txt'}</button>

interface/web/mail/templates/mail_forward_edit.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
<input type="hidden" name="type" value="forward">
3838

3939
<div class="clear">
40-
<tmpl_if name='id'>
40+
<tmpl_if name='id'><tmpl_if name='show_delete_on_forms' op="==" value="y">
4141
<a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('mail/mail_domain_del.php?id={tmpl_var name='id'}&_csrf_id={tmpl_var name='_csrf_id'}&_csrf_key={tmpl_var name='_csrf_key'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a>
42-
</tmpl_if>
42+
</tmpl_if></tmpl_if>
4343
<div class="right">
4444
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="mail/mail_forward_edit.php">{tmpl_var name='btn_save_txt'}</button>
4545
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="mail/mail_forward_list.php">{tmpl_var name='btn_cancel_txt'}</button>

interface/web/mail/templates/mail_user_mailbox_edit.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@
110110
<input type="hidden" name="id" value="{tmpl_var name='id'}">
111111

112112
<div class="clear">
113-
<tmpl_if name='id'>
113+
<tmpl_if name='id'><tmpl_if name='show_delete_on_forms' op="==" value="y">
114114
<a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('mail/mail_user_del.php?id={tmpl_var name='id'}&_csrf_id={tmpl_var name='_csrf_id'}&_csrf_key={tmpl_var name='_csrf_key'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a>
115-
</tmpl_if>
115+
</tmpl_if></tmpl_if>
116116
<div class="right">
117117
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="mail/mail_user_edit.php">{tmpl_var name='btn_save_txt'}</button>
118118
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="mail/mail_user_list.php">{tmpl_var name='btn_cancel_txt'}</button>

0 commit comments

Comments
 (0)