diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php
index fb0fc7f7b3b2c246db1949499125387b96bd4f4b..40e9868c1e6e937c9e34ac53cbfa5a2b6f45958a 100644
--- a/interface/web/admin/form/system_config.tform.php
+++ b/interface/web/admin/form/system_config.tform.php
@@ -174,12 +174,30 @@ $form["tabs"]['mail'] = array (
##################################
# Begin Datatable fields
##################################
- 'enable_custom_login' => array(
- 'datatype' => 'VARCHAR',
- 'formtype' => 'CHECKBOX',
- 'default' => 'n',
- 'value' => array(0 => 'n', 1 => 'y')
- ),
+ 'enable_custom_login' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array(0 => 'n', 1 => 'y')
+ ),
+ 'mailbox_show_autoresponder_tab' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'y',
+ 'value' => array(0 => 'n',1 => 'y')
+ ),
+ 'mailbox_show_mail_filter_tab' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'y',
+ 'value' => array(0 => 'n',1 => 'y')
+ ),
+ 'mailbox_show_custom_rules_tab' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'y',
+ 'value' => array(0 => 'n',1 => 'y')
+ ),
'mailboxlist_webmail_link' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng
index 03ce902373c6a32a4716e987db8c2871dc55dc7e..5c706bb3bac49f8a950473ef77208c983add5770 100644
--- a/interface/web/admin/lib/lang/en_system_config.lng
+++ b/interface/web/admin/lib/lang/en_system_config.lng
@@ -23,6 +23,9 @@ $wb["webdavuser_prefix_error_regex"] = 'Char not allowed in webdav user prefix.'
$wb["dblist_phpmyadmin_link_txt"] = 'Link to phpmyadmin in DB list';
$wb['enable_custom_login_txt'] = 'Allow custom login name';
$wb["mailboxlist_webmail_link_txt"] = 'Link to webmail in Mailbox list';
+$wb['mailbox_show_autoresponder_tab_txt'] = 'Show Autoresponder tab in Mailbox detail';
+$wb['mailbox_show_mail_filter_tab_txt'] = 'Show Mail Filter tab in Mailbox detail';
+$wb['mailbox_show_custom_rules_tab_txt'] = 'Show Custom Rules tab in Mailbox detail';
$wb["webmail_url_txt"] = 'Webmail URL';
$wb["mailmailinglist_link_txt"] = 'Link to mailing list in Mailing list list';
$wb["mailmailinglist_url_txt"] = 'Mailing list URL';
diff --git a/interface/web/admin/lib/lang/nl_system_config.lng b/interface/web/admin/lib/lang/nl_system_config.lng
index 673664cc7bb716d553a630fa666252e67501e895..0955743f59b05295ff55c5e0b747434d21c073bb 100644
--- a/interface/web/admin/lib/lang/nl_system_config.lng
+++ b/interface/web/admin/lib/lang/nl_system_config.lng
@@ -16,6 +16,9 @@ $wb['shelluser_prefix_error_regex'] = 'Char niet toegestaan in shell gebruiker v
$wb['webdavuser_prefix_error_regex'] = 'Char niet toegestaan in webdav gebruiker voorvoegsel.';
$wb['dblist_phpmyadmin_link_txt'] = 'Link naar phpmyadmin in DB lijst';
$wb['mailboxlist_webmail_link_txt'] = 'Link naar webmail in Mailbox lijst';
+$wb['mailbox_show_autoresponder_tab_txt'] = 'Toon Autoresponder tabblad in Mailbox detail';
+$wb['mailbox_show_mail_filter_tab_txt'] = 'Toon Mail Filter tabblad in Mailbox detail';
+$wb['mailbox_show_custom_rules_tab_txt'] 'Toon Custom Rules tabblad in Mailbox detail';
$wb['webmail_url_txt'] = 'Webmail URL';
$wb['phpmyadmin_url_txt'] = 'PHPMyAdmin URL';
$wb['use_domain_module_txt'] = 'Gebruik de domein-module om nieuwe domeinen toe te voegen';
diff --git a/interface/web/admin/templates/system_config_mail_edit.htm b/interface/web/admin/templates/system_config_mail_edit.htm
index 91fcc1f7c90e1b5476f9a276d2414e20be5e4ef3..f69ed8530f46b4d82a3d7b447cd7f77a9be8c36b 100644
--- a/interface/web/admin/templates/system_config_mail_edit.htm
+++ b/interface/web/admin/templates/system_config_mail_edit.htm
@@ -11,6 +11,24 @@
{tmpl_var name='enable_custom_login'}
+
+
{tmpl_var name='mailbox_show_autoresponder_tab_txt'}
+
+ {tmpl_var name='mailbox_show_autoresponder_tab'}
+
+
+
+
{tmpl_var name='mailbox_show_mail_filter_tab_txt'}
+
+ {tmpl_var name='mailbox_show_mail_filter_tab'}
+
+
+
+
{tmpl_var name='mailbox_show_custom_rules_tab_txt'}
+
+ {tmpl_var name='mailbox_show_custom_rules_tab'}
+
+
{tmpl_var name='mailboxlist_webmail_link_txt'}
@@ -77,4 +95,4 @@
-
\ No newline at end of file
+
diff --git a/interface/web/mail/form/mail_user.tform.php b/interface/web/mail/form/mail_user.tform.php
index 5ec0cbce29f75ed7e37e751beeb93cf7bd87de63..ddccdbf060a0e8ed4c15fe3a633535c62cf2c6cc 100644
--- a/interface/web/mail/form/mail_user.tform.php
+++ b/interface/web/mail/form/mail_user.tform.php
@@ -38,6 +38,8 @@
*/
global $app;
+$app->uses('getconf');
+$global_config = $app->getconf->get_global_config();
$form["title"] = "Mailbox";
$form["description"] = "";
@@ -230,115 +232,118 @@ $form["tabs"]['mailuser'] = array (
)
);
-$form["tabs"]['autoresponder'] = array (
- 'title' => "Autoresponder",
- 'width' => 100,
- 'template' => "templates/mail_user_autoresponder_edit.htm",
- 'fields' => array (
- ##################################
- # Begin Datatable fields
- ##################################
- 'autoresponder_subject' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => 'Out of office reply',
- 'value' => '',
- 'width' => '30',
- 'maxlength' => '255'
- ),
- 'autoresponder_text' => array (
- 'datatype' => 'TEXT',
- 'formtype' => 'TEXTAREA',
- 'default' => '',
- 'value' => '',
- 'cols' => '30',
- 'rows' => '15'
- ),
- 'autoresponder' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'CHECKBOX',
- 'default' => 'n',
- 'value' => array(1 => 'y',0 => 'n')
- ),
- 'autoresponder_start_date' => array (
- 'datatype' => 'DATETIME',
- 'formtype' => 'DATETIME',
- 'validators'=> array ( 0 => array ( 'type' => 'CUSTOM',
- 'class' => 'validate_autoresponder',
- 'function' => 'start_date',
- 'errmsg'=> 'autoresponder_start_date_is_required'),
- )
- ),
- 'autoresponder_end_date' => array (
- 'datatype' => 'DATETIME',
- 'formtype' => 'DATETIME',
- 'validators'=> array ( 0 => array ( 'type' => 'CUSTOM',
- 'class' => 'validate_autoresponder',
- 'function' => 'end_date',
- 'errmsg'=> 'autoresponder_end_date_isgreater'),
- ),
- ),
- ##################################
- # END Datatable fields
- ##################################
- )
-);
+if ($global_config['mail']['mailbox_show_autoresponder_tab'] === 'y') {
+ $form["tabs"]['autoresponder'] = array (
+ 'title' => "Autoresponder",
+ 'width' => 100,
+ 'template' => "templates/mail_user_autoresponder_edit.htm",
+ 'fields' => array (
+ ##################################
+ # Begin Datatable fields
+ ##################################
+ 'autoresponder_subject' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => 'Out of office reply',
+ 'value' => '',
+ 'width' => '30',
+ 'maxlength' => '255'
+ ),
+ 'autoresponder_text' => array (
+ 'datatype' => 'TEXT',
+ 'formtype' => 'TEXTAREA',
+ 'default' => '',
+ 'value' => '',
+ 'cols' => '30',
+ 'rows' => '15'
+ ),
+ 'autoresponder' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array(1 => 'y',0 => 'n')
+ ),
+ 'autoresponder_start_date' => array (
+ 'datatype' => 'DATETIME',
+ 'formtype' => 'DATETIME',
+ 'validators'=> array ( 0 => array ( 'type' => 'CUSTOM',
+ 'class' => 'validate_autoresponder',
+ 'function' => 'start_date',
+ 'errmsg'=> 'autoresponder_start_date_is_required'),
+ )
+ ),
+ 'autoresponder_end_date' => array (
+ 'datatype' => 'DATETIME',
+ 'formtype' => 'DATETIME',
+ 'validators'=> array ( 0 => array ( 'type' => 'CUSTOM',
+ 'class' => 'validate_autoresponder',
+ 'function' => 'end_date',
+ 'errmsg'=> 'autoresponder_end_date_isgreater'),
+ ),
+ ),
+ ##################################
+ # END Datatable fields
+ ##################################
+ )
+ );
+}
-$form["tabs"]['filter_records'] = array (
- 'title' => "Mail Filter",
- 'width' => 100,
- 'template' => "templates/mail_user_mailfilter_edit.htm",
- 'fields' => array (
- ##################################
- # Begin Datatable fields
- ##################################
- 'move_junk' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'CHECKBOX',
- 'default' => 'n',
- 'value' => array(0 => 'n',1 => 'y')
+
+if ($global_config['mail']['mailbox_show_mail_filter_tab'] === 'y') {
+ $form["tabs"]['filter_records'] = array (
+ 'title' => "Mail Filter",
+ 'width' => 100,
+ 'template' => "templates/mail_user_mailfilter_edit.htm",
+ 'fields' => array (
+ ##################################
+ # Begin Datatable fields
+ ##################################
+ 'move_junk' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array(0 => 'n',1 => 'y')
+ ),
+ ##################################
+ # END Datatable fields
+ ##################################
),
- ##################################
- # END Datatable fields
- ##################################
- ),
- 'plugins' => array (
- 'filter_records' => array (
- 'class' => 'plugin_listview',
- 'options' => array(
- 'listdef' => 'list/mail_user_filter.list.php',
- 'sqlextwhere' => "mailuser_id = ".@$app->functions->intval(@$_REQUEST['id']),
- 'sql_order_by' => "ORDER BY rulename"
+ 'plugins' => array (
+ 'filter_records' => array (
+ 'class' => 'plugin_listview',
+ 'options' => array(
+ 'listdef' => 'list/mail_user_filter.list.php',
+ 'sqlextwhere' => "mailuser_id = ".@$app->functions->intval(@$_REQUEST['id']),
+ 'sql_order_by' => "ORDER BY rulename"
+ )
)
- )
- )
-);
+ )
+ );
+}
-if($_SESSION["s"]["user"]["typ"] == 'admin') {
-
-$form["tabs"]['mailfilter'] = array (
- 'title' => "Custom Rules",
- 'width' => 100,
- 'template' => "templates/mail_user_custom_rules_edit.htm",
- 'fields' => array (
- ##################################
- # Begin Datatable fields
- ##################################
- 'custom_mailfilter' => array (
- 'datatype' => 'TEXT',
- 'formtype' => 'TEXTAREA',
- 'default' => '',
- 'value' => '',
- 'cols' => '30',
- 'rows' => '15'
- ),
- ##################################
- # END Datatable fields
- ##################################
- )
-);
+if ($_SESSION["s"]["user"]["typ"] == 'admin' && $global_config['mail']['mailbox_show_custom_rules_tab'] === 'y') {
+ $form["tabs"]['mailfilter'] = array (
+ 'title' => "Custom Rules",
+ 'width' => 100,
+ 'template' => "templates/mail_user_custom_rules_edit.htm",
+ 'fields' => array (
+ ##################################
+ # Begin Datatable fields
+ ##################################
+ 'custom_mailfilter' => array (
+ 'datatype' => 'TEXT',
+ 'formtype' => 'TEXTAREA',
+ 'default' => '',
+ 'value' => '',
+ 'cols' => '30',
+ 'rows' => '15'
+ ),
+ ##################################
+ # END Datatable fields
+ ##################################
+ )
+ );
}
-
-?>
\ No newline at end of file
+?>