diff --git a/plugins/admin/ogroups/class_phonequeue.inc b/plugins/admin/ogroups/class_phonequeue.inc
index c7f61c946901f3b32fd880e1f93226eba7fe698c..d20ad03dc719f015b9d0d352aece44d9a7f08ad0 100644 (file)
function execute()
{
+ /* Call parent execute */
+ plugin::execute();
+
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
$this->is_account= !$this->is_account;
$display= $this->show_header(_("Remove the phone queue from this Account"),
_("Phone queue is enabled for this group. You can disable it by clicking below."));
} else {
- $display= $this->show_header(_("Create phone queue"), _("For this group the phone queues are disabled. You can enable them by clicking below."));
+ $display= $this->show_header(_("Create phone queue"),
+ _("For this group the phone queues are disabled. You can enable them by clicking below."));
return ($display);
}
}
$smarty= get_smarty();
- $smarty->assign("goFonQueueLanguageOptions",array('de'=>_('German'),'ur'=>_('Uruguai')));
+ $smarty->assign("goFonQueueLanguageOptions",array('de'=>_('German')));
$smarty->assign("goFonQueueStrategyOptions", $this->goFonQueueStrategyOptions);
foreach($this->attributes as $key => $val){
/* Check formular input */
function check()
{
- $message= array();
- #fixme workaround : Tab is not initialised correct
- if(!$this->is_account) return($message);
+ /* Call common method to give check the hook */
+ $message= plugin::check();
if($this->is_number_used()){
$message[] = $this->is_number_used();
$SQL = array();
if(!isset($_SESSION['config']->data['SERVERS']['FON'])){
- return(_("There is currently no asterisk server defined. Possibly you are missing a server that handles the asterisk management (goFonServer).\nYour Settings can't be saved to asterisk Database."));
- return(false);
+ return(_("There is currently no asterisk server defined. Your settings can't be saved."));
}
// Get Configuration for Mysql database Server
// Check if we are connected correctly
if(!$r_con){
gosa_log(mysql_error());
- return (sprintf(_("The MySQL Server '%s' isn't reachable as user '%s', check GOsa log for mysql error."),
+ return (sprintf(_("The MySQL server '%s' isn't reachable as user '%s', check GOsa log for mysql error."),
$a_SETUP['SERVER'],$a_SETUP['LOGIN']));
}
/* Save data to LDAP */
$ldap->cd($this->dn);
- $ldap->modify($this->attrs);
+ $this->cleanup();
+ $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){
@DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,
$this->attributes, "Save");
$ldap->cd($this->dn);
- $ldap->modify($this->attrs);
- show_ldap_error($ldap->get_error());
+ $this->cleanup();
+ $ldap->modify ($this->attrs);
+
+ 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 .= " <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: