From: hickert Date: Tue, 21 Mar 2006 07:56:01 +0000 (+0000) Subject: Added copy & paste for user mail X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ee8855a97aca9d3de6e98445ec833ca3ebff0661;p=gosa.git Added copy & paste for user mail git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2872 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index ee74aafce..13256a3cf 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -703,6 +703,7 @@ $ldap->modify ($this->attrs); /* Check formular input */ function check() { + if(!$this->is_account) return(array()); $ldap= $this->config->get_ldap_link(); $message= array(); @@ -725,6 +726,7 @@ $ldap->modify ($this->attrs); } } $ldap->cd($this->config->current['BASE']); + echo "(&(!(objectClass=gosaUserTemplate))(objectClass=gosaMailAccount)(|(mail=".$this->mail.")(gosaMailAlternateAddress=".$this->mail."))(! (uid=".$this->uid."))(!(cn=".$this->uid.")))"; $ldap->search ("(&(!(objectClass=gosaUserTemplate))(objectClass=gosaMailAccount)(|(mail=".$this->mail.")(gosaMailAlternateAddress=".$this->mail."))(!(uid=".$this->uid."))(!(cn=".$this->uid.")))", array("uid")); if ($ldap->count() != 0){ $message[]= _("The primary address you've entered is already in use."); @@ -859,6 +861,28 @@ $ldap->modify ($this->attrs); return ($name); } + function getCopyDialog() + { + if(!$this->is_account) return(""); + $smarty = get_smarty(); + $smarty->assign("mail",$this->mail); + $smarty->assign("gosaMailAlternateAddress",$this->gosaMailAlternateAddress); + $smarty->assign("gosaMailForwardingAddress",$this->gosaMailForwardingAddress); + return($smarty->fetch(get_template_path("copypaste.tpl",TRUE, dirname(__FILE__)))); + } + + function saveCopyDialog() + { + if(!$this->is_account) return; + + /* Execute to save mailAlternateAddress && gosaMailForwardingAddress */ + $this->execute(); + + if(isset($_POST['mail'])){ + $this->mail = $_POST['mail']; + } + + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/plugins/personal/mail/copypaste.tpl b/plugins/personal/mail/copypaste.tpl new file mode 100644 index 000000000..fdfca59a3 --- /dev/null +++ b/plugins/personal/mail/copypaste.tpl @@ -0,0 +1,51 @@ +

{t}Mail settings{/t}

+ + + + + +
+ + + + + + + + +
{$must}
+

+ +

+ +
+ +   +   + + +
+
+ + + + +
+

+ + +

+ +
+ + + +
+