summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 710e377)
raw | patch | inline | side by side (parent: 710e377)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 16 Nov 2006 04:21:17 +0000 (04:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 16 Nov 2006 04:21:17 +0000 (04:21 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5130 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/groups/class_groupApplication.inc | patch | blob | history | |
plugins/admin/ogroups/class_mailogroup.inc | patch | blob | history | |
plugins/admin/ogroups/class_ogroup.inc | patch | blob | history | |
plugins/admin/ogroups/class_ogroupManagement.inc | patch | blob | history | |
plugins/admin/ogroups/class_termgroup.inc | patch | blob | history | |
plugins/admin/ogroups/paste_generic.tpl | [new file with mode: 0644] | patch | blob |
plugins/admin/ogroups/paste_mail.tpl | [new file with mode: 0644] | patch | blob |
plugins/admin/ogroups/tabs_ogroups.inc | patch | blob | history |
diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc
index eff39655d6e7d8c3226961119088a7de7606c672..9efbbc63f59ea7fb8e53a2c0a569e7bf279d5cdb 100644 (file)
$departments = array();
$res = get_list("(objectClass=gosaDepartment)", "application", $this->curbase,array("description","cn","ou"),GL_SIZELIMIT);
foreach($res as $value){
- $fdn= @LDAP::fix(str_replace($this->curbase,"",$value['dn']));
+ $fdn = $value['dn'];
+ $fdn = preg_replace("/".normalizePreg($this->curbase)."/","",$fdn);
+ $fdn= @LDAP::fix($fdn);
if($value["description"][0]!=".."){
$departments[$value['dn']]= convert_department_dn($fdn)." - [".$value["description"][0]."]";
}else{
diff --git a/plugins/admin/ogroups/class_mailogroup.inc b/plugins/admin/ogroups/class_mailogroup.inc
index cddc5b07d2c13cc15a6a1e237cf45c467c1f53c7..ce860169c94e70dc69ab0c9da857ce516b4ec99f 100644 (file)
/* 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.");
}
function getCopyDialog()
{
- $str = "";
- $str .= _("Phone number");
- $str .= " <input type='text' name='mail' value='".$this->mail."'>";
- 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);
}
index 03174fbd579e6f7dfa7fb4509bf5ba7e140e133b..250cce677815efb36e0dd5d6a216a52e20f11a87 100644 (file)
$this->handle_post_events("remove");
}
+
function getCopyDialog()
{
- $str = "";
- $str .= _("Group name");
- $str .= " <input type='text' name='cn' value='".$this->cn."'>";
- return($str);
+ $smarty = get_smarty();
+ $smarty->assign("cn", $this->cn);
+ $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE,dirname(__FILE__)));
+ $ret = array();
+ $ret['string'] = $str;
+ $ret['status'] = "";
+ return($ret);
}
function saveCopyDialog()
diff --git a/plugins/admin/ogroups/class_ogroupManagement.inc b/plugins/admin/ogroups/class_ogroupManagement.inc
index a852876df8eb608d018392f2b5c9831cafc87b05..f3a3ad2593eb9f6bb10cf2e6821a0b876f9d1251 100644 (file)
Copy & Paste handling
****************/
- /* Only perform copy / paste if it is enabled
- */
- if($this->CopyPasteHandler){
-
- /* Paste copied/cutted object in here
- */
- if(($s_action == "editPaste") || ($this->CopyPasteHandler->stillOpen())){
- $this->CopyPasteHandler->save_object();
- $this->CopyPasteHandler->SetVar("base", $this->DivListOGroup->selectedBase);
- return($this->CopyPasteHandler->execute());
- }
-
- /* Copy current object to CopyHandler
- */
- if($s_action == "copy"){
- $this->CopyPasteHandler->Clear();
- $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");
- $this->CopyPasteHandler->Copy($obj,$objNew);
- }
-
- /* Copy current object to CopyHandler
- */
- if($s_action == "cut"){
- $this->CopyPasteHandler->Clear();
- $dn = $this->ogrouplist[$s_entry]['dn'];
- $obj = new ogrouptabs($this->config, $this->config->data['TABS']['OGROUPTABS'], $dn);
- $this->CopyPasteHandler->Cut($obj);
- }
+ /* Display the copy & paste dialog, if it is currently open */
+ $ret = $this->copyPasteHandling($s_action,$s_entry);
+ if($ret){
+ return($ret);
}
-
/****************
Create a new object group
****************/
reset ($this->ogrouplist);
}
+
+ function copyPasteHandling($s_action,$s_entry)
+ {
+ if($this->CopyPasteHandler){
+
+ /* Paste copied/cutted object in here
+ */
+ if(($s_action == "editPaste") || ($this->CopyPasteHandler->stillOpen())){
+ $this->CopyPasteHandler->save_object();
+ $this->CopyPasteHandler->SetVar("base", $this->DivListOGroup->selectedBase);
+ return($this->CopyPasteHandler->execute());
+ }
+
+ /* Copy current object to CopyHandler
+ */
+ if($s_action == "copy"){
+ $this->CopyPasteHandler->Clear();
+ $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);
+ }
+
+ /* Copy current object to CopyHandler
+ */
+ if($s_action == "cut"){
+ $this->CopyPasteHandler->Clear();
+ $dn = $this->ogrouplist[$s_entry]['dn'];
+ $obj = new ogrouptabs($this->config, $this->config->data['TABS']['OGROUPTABS'], $dn);
+ $this->CopyPasteHandler->Cut($obj);
+ }
+ }
+ }
+
+
function save_object()
{
$this->DivListOGroup->save_object();
index b60800884be2fc3e6b6d709d629502c085e25860..f803cb85adb6880f89b3fd21abf65925f19665bb 100644 (file)
"memcheck" => "memcheck",
"sysinfo" => "sysinfo");
+ var $CopyPasteVars = array("gotoNtpServers","modes","inheritTimeServer");
+
function termgroup ($config, $dn= NULL, $parent= NULL)
{
/***************
diff --git a/plugins/admin/ogroups/paste_generic.tpl b/plugins/admin/ogroups/paste_generic.tpl
--- /dev/null
@@ -0,0 +1,10 @@
+<table width='100%'>
+ <tr>
+ <td width='120'>
+ <LABEL for="cn">{t}Group name{/t}</LABEL>{$must}
+ </td>
+ <td>
+ <input type='text' id='cn' name='cn' value='{$cn}' size='40' title='{t}Please enter the new object group name{/t}'>
+ </td>
+ </tr>
+</table>
diff --git a/plugins/admin/ogroups/paste_mail.tpl b/plugins/admin/ogroups/paste_mail.tpl
--- /dev/null
@@ -0,0 +1,10 @@
+<table width='100%'>
+ <tr>
+ <td width='120'>
+ <LABEL for="cn">{t}Mail{/t}</LABEL>{$must}
+ </td>
+ <td>
+ <input type='text' id='main' name='mail' value='{$mail}' size='40' title='{t}Please enter a mail address{/t}'>
+ </td>
+ </tr>
+</table>
index 35d19c4ff23b4a7a2f2c347f8708a1a7b6130c15..0b5fcb9f26020d2b8e918b70b4f0e3ba4b132262 100644 (file)
/* 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;
}