From: hickert Date: Fri, 19 Mar 2010 14:23:52 +0000 (+0000) Subject: Updated kolab service X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3858826f9a6d4c7b90b40582a5804b7bc9dc077b;p=gosa.git Updated kolab service git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16956 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/kolab/admin/systems/services/kolab/class_servKolab.inc b/gosa-plugins/kolab/admin/systems/services/kolab/class_servKolab.inc index 96f54b7e3..d8ca73c63 100644 --- a/gosa-plugins/kolab/admin/systems/services/kolab/class_servKolab.inc +++ b/gosa-plugins/kolab/admin/systems/services/kolab/class_servKolab.inc @@ -149,10 +149,8 @@ class servkolab extends goService { $divlist->setHeight(100); foreach($this->postfix_mydestination as $key => $domain){ $f1 = array("string" => $domain); - $f2 = array("string" => "", - "attach" => "style='border-right:0px; width: 20px;'"); + $f2 = array("string" => image('images/lists/trash.png', 'remove_domain_'.$key, _("Remove")), + "attach" => "style='border-right:0px; width: 20px;'"); $divlist->AddEntry(array($f1,$f2)); } $smarty->assign("mdDiv",$divlist->DrawList()); @@ -250,7 +248,7 @@ class servkolab extends goService { */ foreach($_POST as $name => $value){ if(preg_match("/^remove_domain_/",$name)){ - $id = preg_replace("/^remove_domain_([0-9]*)_.*$/","\\1",$name); + $id = preg_replace("/^remove_domain_([0-9]*)$/","\\1",$name); if(isset($this->postfix_mydestination[$id])){ unset($this->postfix_mydestination[$id]); } @@ -259,8 +257,13 @@ class servkolab extends goService { } if(isset($_POST['add_domain_name']) && isset($_POST['new_domain_name'])){ $new_domain = trim(get_post('new_domain_name')); - if(!empty($new_domain) && tests::is_domain($new_domain)){ - $this->postfix_mydestination[] = $new_domain; + if(!empty($new_domain)){ + if(tests::is_domain($new_domain)){ + $this->postfix_mydestination[] = $new_domain; + $this->postfix_mydestination = array_unique($this->postfix_mydestination); + }else{ + msg_dialog::display(_("Info"), msgPool::invalid(_("Mail domain"))); + } } } diff --git a/gosa-plugins/kolab/admin/systems/services/kolab/servkolab.tpl b/gosa-plugins/kolab/admin/systems/services/kolab/servkolab.tpl index a7a4246e6..0610c8739 100644 --- a/gosa-plugins/kolab/admin/systems/services/kolab/servkolab.tpl +++ b/gosa-plugins/kolab/admin/systems/services/kolab/servkolab.tpl @@ -7,7 +7,7 @@ {t}Generic{/t} - {t}Postfix mydomain{/t} + {t}Postfix mydomain{/t} {$must} {render acl=$postfixmydomainACL} @@ -25,7 +25,8 @@ - {t}Mail domains{/t} ({t}Postfix mydestination{/t})
+ {t}Mail domains{/t} ({t}Postfix mydestination{/t}) {$must} +
{render acl=$postfixmydestinationACL} {$mdDiv} {/render}