From: hickert Date: Wed, 15 Nov 2006 10:01:27 +0000 (+0000) Subject: Some ogroup fixes for copy & paste X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b6b25edc93f63be561a7d5311ed1a73055cae4f6;p=gosa.git Some ogroup fixes for copy & paste git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5122 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/ogroups/class_mailogroup.inc b/plugins/admin/ogroups/class_mailogroup.inc index ed9d9ed6d..560e4653c 100644 --- a/plugins/admin/ogroups/class_mailogroup.inc +++ b/plugins/admin/ogroups/class_mailogroup.inc @@ -26,8 +26,8 @@ class mailogroup extends plugin 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'])){ @@ -73,7 +73,7 @@ class mailogroup extends plugin /* Check if mail address is already in use */ $ldap->cd($this->config->current['BASE']); - $ldap->search ("(&(!(objectClass=gosaUserTemplate))(|(mail=".$this->mail. ")(gosaMailAlternateAddress=".$this->mail."))(!(cn=".$this->cn.")))", array("uid")); + $ldap->search ("(&(!(objectClass=gosaUserTemplate))(|(mail=".$this->mail.")(gosaMailAlternateAddress=".$this->mail."))(!(cn=".$this->cn.")))", array("uid")); if ($ldap->count() != 0){ $message[]= _("The primary address you've entered is already in use."); } @@ -134,13 +134,16 @@ class mailogroup extends plugin function getCopyDialog() { - $str = ""; - $str .= _("Phone number"); - $str .= " "; - return($str); + $str = ""; + $smarty = get_smarty(); + $smarty->assign("mail", $this->mail); + $str = $smarty->fetch(get_template_path("paste_mail.tpl",TRUE,dirname(__FILE__))); + $ret = array(); + $ret['string'] = $str; + $ret['status'] = ""; + return($ret); } - function saveCopyDialog() { if(isset($_POST['mail'])){ diff --git a/plugins/admin/ogroups/class_ogroupManagement.inc b/plugins/admin/ogroups/class_ogroupManagement.inc index d6021660e..09fba6b17 100644 --- a/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/plugins/admin/ogroups/class_ogroupManagement.inc @@ -453,6 +453,11 @@ class ogroupManagement extends plugin $dn = $this->ogrouplist[$s_entry]['dn']; $obj = new ogrouptabs($this->config, $this->config->data['TABS']['OGROUPTABS'], $dn); $objNew = new ogrouptabs($this->config, $this->config->data['TABS']['OGROUPTABS'], "new"); + + $types_of_tabs = $obj->by_object['ogroup']->gosaGroupObjects; + $objNew->by_object['ogroup']->gosaGroupObjects = $types_of_tabs; + $objNew->reload($types_of_tabs); + $this->CopyPasteHandler->Copy($obj,$objNew); } diff --git a/plugins/admin/ogroups/paste_generic.tpl b/plugins/admin/ogroups/paste_generic.tpl new file mode 100644 index 000000000..8daafc6a2 --- /dev/null +++ b/plugins/admin/ogroups/paste_generic.tpl @@ -0,0 +1,10 @@ + + + + + +
+ {$must} + + +
diff --git a/plugins/admin/ogroups/paste_mail.tpl b/plugins/admin/ogroups/paste_mail.tpl new file mode 100644 index 000000000..1930c44c8 --- /dev/null +++ b/plugins/admin/ogroups/paste_mail.tpl @@ -0,0 +1,10 @@ + + + + + +
+ {$must} + + +
diff --git a/plugins/admin/ogroups/tabs_ogroups.inc b/plugins/admin/ogroups/tabs_ogroups.inc index 5364185c1..b1a1d1ffe 100644 --- a/plugins/admin/ogroups/tabs_ogroups.inc +++ b/plugins/admin/ogroups/tabs_ogroups.inc @@ -200,10 +200,11 @@ class ogrouptabs extends tabs /* Don't touch base object */ if ($name != 'ogroup'){ - $obj->parent= &$this; - $obj->uid= $baseobject->uid; - $obj->sn= $baseobject->uid; - $obj->givenName= $baseobject->uid; + $obj->parent = &$this; + $obj->uid = $baseobject->uid; + $obj->cn = $baseobject->cn; + $obj->sn = $baseobject->uid; + $obj->givenName = $baseobject->uid; $this->by_object[$name]= $obj; }