diff --git a/plugins/admin/ogroups/class_mailogroup.inc b/plugins/admin/ogroups/class_mailogroup.inc
index b111909422cd8d26f39e86327aed189c067b218a..aa11b64a9b7dacc665b8dde8b4f9b4cb47d233b2 100644 (file)
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
/* Do we need to flip is_account state? */
- if (isset($_POST['modify_state'])){
- $this->is_account= !$this->is_account;
+ if(isset($_POST['modify_state'])){
+ if($this->is_account && $this->acl_is_removeable()){
+ $this->is_account= FALSE;
+ }elseif(!$this->is_account && $this->acl_is_createable()){
+ $this->is_account= TRUE;
+ }
}
/* Show tab dialog headers */
if ($this->parent != NULL){
if ($this->is_account){
- $display= $this->show_header(_("Remove mail account"),
+ $display= $this->show_disable_header(_("Remove mail account"),
_("This group has mail features enabled. You can disable them by clicking below."));
} else {
- $display= $this->show_header(_("Create mail account"), _("This group has mail features disabled. You can enable them by clicking below."));
+ $display= $this->show_enable_header(_("Create mail account"), _("This group has mail features disabled. You can enable them by clicking below."));
return ($display);
}
}
/* Initialize templating engine */
$smarty= get_smarty();
+ $tmp = $this->plInfo();
+ foreach($tmp['plProvidedAcls'] as $name => $translation){
+ $smarty->assign($name."ACL",$this->getacl("mail"));
+ }
+
/* Assign mail attribute */
$smarty->assign("mail", $this->mail);
- $smarty->assign("mailACL", chkacl($this->acl, "mail"));
/* Show main page */
return ($display.$smarty->fetch (get_template_path('mail.tpl', TRUE)));
}
- function plInfo()
+ function plInfo()
{
return (array(
"plShortName" => _("Mail"),