From afe5d7f77f79625e3c4e64fe06e32e78011b39c3 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 12 Nov 2014 11:18:01 +0000 Subject: [PATCH] disable UI for forwarding, if it is not supported by smtp server plugin --- emailadmin/inc/class.emailadmin_wizard.inc.php | 8 ++++++++ emailadmin/templates/default/account.xet | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/emailadmin/inc/class.emailadmin_wizard.inc.php b/emailadmin/inc/class.emailadmin_wizard.inc.php index 1460885ea1..0ef4d4b6f5 100644 --- a/emailadmin/inc/class.emailadmin_wizard.inc.php +++ b/emailadmin/inc/class.emailadmin_wizard.inc.php @@ -1221,6 +1221,14 @@ class emailadmin_wizard $readonlys['tabs']['emailadmin.account.aliases'] = !$content['acc_smtp_type'] || $content['acc_smtp_type'] == 'emailadmin_smtp'; + // allow smtp class to disable certain features in alias tab + if ($content['acc_smtp_type'] && class_exists($content['acc_smtp_type']) && + is_a($content['acc_smtp_type'], 'emailadmin_smtp_ldap', true)) + { + $content['no_forward_available'] = !constant($content['acc_smtp_type'].'::FORWARD_ATTR'); + $readonlys['deliveryMode'] = !constant($content['acc_smtp_type'].'::FORWARD_ONLY_ATTR'); + } + // allow imap classes to disable certain tabs or fields if (($class = emailadmin_account::getIcClass($content['acc_imap_type'])) && class_exists($class) && ($imap_ro = call_user_func(array($class, 'getUIreadonlys')))) diff --git a/emailadmin/templates/default/account.xet b/emailadmin/templates/default/account.xet index 3ba1ab5ac7..ffe300a2c7 100644 --- a/emailadmin/templates/default/account.xet +++ b/emailadmin/templates/default/account.xet @@ -255,7 +255,7 @@ - +