Code

Added ogroups acls
[gosa.git] / plugins / admin / ogroups / class_phonequeue.inc
index c0e669b03843521b43eb1c69fa7efeb1018336b1..d20ad03dc719f015b9d0d352aece44d9a7f08ad0 100644 (file)
@@ -186,7 +186,9 @@ class phonequeue extends plugin
   /* Check formular input */
   function check()
   {
-    $message= array();
+    /* Call common method to give check the hook */
+    $message= plugin::check();
+
     if($this->is_number_used()){
       $message[] = $this->is_number_used();
     }
@@ -580,10 +582,9 @@ class phonequeue extends plugin
     /* Save data to LDAP */
     $ldap->cd($this->dn);
     $this->cleanup();
-$ldap->modify ($this->attrs); 
-
+    $ldap->modify ($this->attrs); 
 
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), sprintf(_("Saving of object group/phone queue with dn '%s' failed."),$this->dn));
 
     /* Optionally execute a command after we're done */
     if ($this->initially_was_account == $this->is_account){
@@ -678,11 +679,71 @@ $ldap->modify ($this->attrs);
         $this->attributes, "Save");
     $ldap->cd($this->dn);
     $this->cleanup();
-$ldap->modify ($this->attrs); 
+    $ldap->modify ($this->attrs); 
 
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), sprintf(_("Removing of object group/phone queue with dn '%s' failed."),$this->dn));
   }
 
+  
+  function getCopyDialog()
+  {
+    $str  = "";
+    $str .= _("Phone number");
+    $str .= "&nbsp;<input type='text' name='telephoneNumber' value='".$this->telephoneNumber."'>";
+    return($str);
+  }
+
+
+  function saveCopyDialog()
+  {
+    if(isset($_POST['telephoneNumber'])){
+      $this->telephoneNumber = $_POST['telephoneNumber'];
+    }
+  }
+
+
+    function plInfo()
+  {
+    return (array(
+          "plShortName"   => _("Phone"),
+          "plDescription" => _("Phone group"),
+          "plSelfModify"  => FALSE,
+          "plDepends"     => array(),
+          "plPriority"    => 0,
+          "plSection"     => array("administration"),
+          "plCategory"    => array("ogroups"), 
+          "plProvidedAcls"=> array(
+
+            "goFonTimeOut"              => _("Timeout"),
+            "goFonMaxLen"               => _("Max queue lenght"),
+            "goFonAnnounceFrequency"    => _(" Announce frequency"),
+            "goFonDialOption_t"         => _("Allow the called user to transfer his call"),
+            "goFonDialOption_T"         => _("Allows calling user to transfer call"),
+            "goFonDialOption_h"         => _("Allow the called to hangup by pressing *"),
+            "goFonDialOption_r"         => _("Ring instead of playing background music"),
+            "goFonDialOption_H"         => _("Allows calling to hangup by pressing *"),
+
+            "goFonMusiconHold"          => _("Music on hold"),
+            "goFonWelcomeMusic"         => _("Welcome music"),
+            "goFonQueueReportHold"      => _("Report hold time"),
+            "goFonQueueYouAreNext"      => _("'You are next' sound"),
+            "goFonQueueThereAre"        => _("'There are' sound"),
+            "goFonQueueCallsWaiting"    => _("'Call waiting' sound"),
+            "goFonQueueThankYou"        => _("'Thank you' sound"),
+            "goFonQueueMinutes"         => _("'Minutes' sound"),
+            "goFonQueueSeconds"         => _("'Second' sound"),
+            "goFonQueueLessThan"        => _("'Less than' sound"),
+            "telephoneNumber"           => _("Queue phone number"),
+            "goFonQueueLanguage"        => _("Language"),
+            "goFonQueueStrategy"        => _("Method"),
+            "goFonQueueAnnounceHoldtime"=> _("Announce holdtime"),
+            "goFonQueueAnnounce"        => _("Announce"),
+            "goFonQueueRetry"           => _("Retry"))
+              ));
+  }
+
+
+
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: