Code

We are able to choose the base now:
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Aug 2005 14:06:04 +0000 (14:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Aug 2005 14:06:04 +0000 (14:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1156 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/conference/class_phoneConferenceGeneric.inc
plugins/gofon/conference/class_phoneConferenceManagment.inc
plugins/gofon/conference/generic.tpl

index c95a03717d68426eceaa274a49096ecd79b65af8..a96686dd3138c7e41989604709c1b079c60c95e8 100644 (file)
@@ -43,12 +43,14 @@ class conference extends plugin
   var $old_tele_number         = false;
   var $generate_error           = "";
 
+  var $old_dn;
+
   /* Headpage attributes */
   var $last_dep_sorting= "invalid";
   var $departments= array();
 
   /* attribute list for save action */
-  var $attributes= array("cn", "description", "goFonPIN","goFonConferenceOption_P","goFonConferenceOption_r",
+  var $attributes= array("cn","base", "description", "goFonPIN","goFonConferenceOption_P","goFonConferenceOption_r",
                                                 "goFonConferenceOption_M","goFonConferenceOption_s","goFonConferenceOption_i","goFonConferenceOption_c",
                                                 "goFonConferenceOption_D","goFonConferenceOptionFormat","goFonConferenceOptionLifetime","telephoneNumber");
 
@@ -94,6 +96,7 @@ class conference extends plugin
       $this->goFonConferenceOptionLifetime  = $tmp1[1];
       $this->old_tele_number                = $this->telephoneNumber;
     }
+    $this->old_dn = $this->dn;
   }
 
   function execute()
@@ -102,6 +105,11 @@ class conference extends plugin
        $this->config->make_idepartments();
        $smarty= get_smarty();
 
+  print_a($_POST);
+
+  $smarty->assign("bases" ,array_flip($this->config->departments));
+  $smarty->assign("base"  ,$this->base);
+
        $smarty->assign("goFonConferenceOptions",                   array("D"=>"Conference ","d"=>"Conference without PIN"));
        $smarty->assign("goFonConferenceOptionFormats", array("WAV"=>"Wave","GSM"=>"GSM","WAV49"=>"Wave49"));
        $smarty->assign("goFonConferenceOption",        $this->goFonConferenceOption_D);
@@ -383,7 +391,11 @@ class conference extends plugin
   unset($this->attrs['goFonConferenceOptionLifetime']);
 
   /* Write back to ldap */
+
+  unset($this->attrs['base']);
+
        $ldap= $this->config->get_ldap_link();
+
        $ldap->cat($this->dn);
        $a= $ldap->fetch();
        $ldap->cd($this->dn);
index 2c3f99e8ebaf9d8b0f19a120c036b7a3c9fb2e7a..3ffdbd874f11d0b6fdb6cee59e8e2bc526e5bf45 100644 (file)
@@ -343,22 +343,19 @@ class phoneConferenceManagment extends plugin
 
        function reload()
        {
-    $base = "dc=gonicus,dc=de";
-   
     $conferencefilter = $_SESSION["conferencefilter"];
     $base             = $conferencefilter['depselect'];
     $regex            = $conferencefilter['regex'];
-     
-               $this->conferences= get_list($this->ui->subtreeACL, "(objectClass=goFonConference)",TRUE, $base, array("*"), TRUE);
+
+               $this->conferences= get_list2($this->ui->subtreeACL, "(objectClass=goFonConference)",TRUE, $base, array("*"), FALSE);
     
     /* NEW LIST MANAGMENT
      * We also need to search for the departments
      * So we are able to navigate like in konquerer
      */
-    $base2 = preg_replace("/ou=people,/i","",$base);
 
     $res3 =  get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))",
-        TRUE, $base2, array("ou", "description"), TRUE);
+        TRUE, $base, array("ou", "description"), TRUE);
 
     $this->departments= array();
 
index 0cd720efb19c257c9a5ce1472730fa99e6101631..b46b782590a31a9668363e02475d2a4d37293979 100644 (file)
        <td colspan="2"><br></td>
        </tr>
        <tr>
-       <td><LABEL for="goFonConferenceOption_D">{t}Base{/t}</LABEL>{$must}</td>
+       <td><LABEL for="goFonConferenceOption_D">{t}Type{/t}</LABEL>{$must}</td>
        <td>
        <select id="goFonConferenceOption_D" size="1" name="goFonConferenceOption_D" title="{t}Choose subtree to place department in{/t}"> 
        {html_options options=$goFonConferenceOptions selected=$goFonConferenceOption_D}
        </select>
        </td>
        </tr>
+       <tr>
+       <td><LABEL for="base">{t}Base{/t}</LABEL>{$must}</td>
+       <td>
+       <select id="base" size="1" name="base" title="{t}Choose subtree to place department in{/t}"> 
+       {html_options options=$bases selected=$base}
+       </select>
+       </td>
+       </tr>
        </table>
 
 </td>