summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bcdbca8)
raw | patch | inline | side by side (parent: bcdbca8)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Mar 2010 14:23:52 +0000 (14:23 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Mar 2010 14:23:52 +0000 (14:23 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16956 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/kolab/admin/systems/services/kolab/class_servKolab.inc | patch | blob | history | |
gosa-plugins/kolab/admin/systems/services/kolab/servkolab.tpl | patch | blob | history |
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 96f54b7e33e747a674e4bfd30076e420cd026859..d8ca73c63caedb1a2c20f6dcd934780ab29e2c5f 100644 (file)
$divlist->setHeight(100);
foreach($this->postfix_mydestination as $key => $domain){
$f1 = array("string" => $domain);
- $f2 = array("string" => "<input type='image' src='images/lists/trash.png'
- name='remove_domain_".$key."'
- title='"._("Remove")."' alt='"._("Remove")."'>",
- "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());
*/
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]);
}
}
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 a7a4246e665a5ff951436e1ef7a9289d3dde6440..0610c8739458dd9315f3a5aa493102f92a8d7171 100644 (file)
<td colspan="2"><b>{t}Generic{/t}</b></td>
</tr>
<tr>
- <td>{t}Postfix mydomain{/t}
+ <td>{t}Postfix mydomain{/t} {$must}
</td>
<td>
{render acl=$postfixmydomainACL}
</td>
</tr>
<tr>
- <td colspan="2">{t}Mail domains{/t} ({t}Postfix mydestination{/t})<br>
+ <td colspan="2">{t}Mail domains{/t} ({t}Postfix mydestination{/t}) {$must}
+<br>
{render acl=$postfixmydestinationACL}
{$mdDiv}
{/render}