summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b296cdf)
raw | patch | inline | side by side (parent: b296cdf)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 1 Sep 2006 09:58:21 +0000 (09:58 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 1 Sep 2006 09:58:21 +0000 (09:58 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4567 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/ogroups/class_mailogroup.inc | patch | blob | history | |
plugins/admin/ogroups/class_phonequeue.inc | patch | blob | history | |
plugins/admin/ogroups/phonequeue.tpl | patch | blob | history |
diff --git a/plugins/admin/ogroups/class_mailogroup.inc b/plugins/admin/ogroups/class_mailogroup.inc
index 33aaf01207c67ced96cd1d3a6b4eac6a6a800cdf..aa11b64a9b7dacc665b8dde8b4f9b4cb47d233b2 100644 (file)
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'])){
- $this->is_account= !$this->is_account;
+ if(isset($_POST['modify_state'])){
+ if($this->is_account && $this->acl_is_removeable()){
+ $this->is_account= FALSE;
+ }elseif(!$this->is_account && $this->acl_is_createable()){
+ $this->is_account= TRUE;
+ }
}
/* Show tab dialog headers */
diff --git a/plugins/admin/ogroups/class_phonequeue.inc b/plugins/admin/ogroups/class_phonequeue.inc
index 22f235db27b7cf2230bc8f12a62727f2f42ceded..e47ae9c61aa2671811af35c78eddbb1b1cd90229 100644 (file)
var $goFonTimeOut ="20";
var $goFonMaxLen ="20"; //
var $goFonAnnounceFrequency ="60"; // Annouce Frequency in seconds
- var $goFonDialOption_t ="";
- var $goFonDialOption_T ="";
- var $goFonDialOption_h ="";
- var $goFonDialOption_r ="";
+ var $goFonDialOptiont ="";
+ var $goFonDialOptionT ="";
+ var $goFonDialOptionh ="";
+ var $goFonDialOptionr ="";
var $goFonQueueAnnounce ="gonicus-berlin-welcome";
- var $goFonDialOption_H ="";
+ var $goFonDialOptionH ="";
var $goFonMusiconHold ="default";
var $goFonWelcomeMusic ="gonicus-berlin-welcome";
var $goFonQueueReportHold ="yes";
var $old_phone_numbers =array();
/* attribute list for save action */
- var $attributes= array( "goFonTimeOut","goFonMaxLen","goFonAnnounceFrequency","goFonDialOption_t","goFonDialOption_T",
- "goFonDialOption_h","goFonDialOption_r","cn",
- "goFonDialOption_H","goFonMusiconHold","goFonWelcomeMusic","goFonQueueReportHold","goFonQueueYouAreNext",
+ var $attributes= array( "goFonTimeOut","goFonMaxLen","goFonAnnounceFrequency","goFonDialOptiont","goFonDialOptionT",
+ "goFonDialOptionh","goFonDialOptionr","cn",
+ "goFonDialOptionH","goFonMusiconHold","goFonWelcomeMusic","goFonQueueReportHold","goFonQueueYouAreNext",
"goFonQueueThereAre","goFonQueueCallsWaiting","goFonQueueThankYou","goFonQueueMinutes","goFonQueueSeconds","goFonQueueLessThan",
"telephoneNumber","goFonQueueLanguage","goFonQueueStrategy","goFonQueueAnnounceHoldtime","goFonQueueAnnounce","goFonDialOption","goFonQueueRetry");
/* ObjectClass */
}
for($i = 0; $i < strlen($this->goFonDialOption); $i++){
- $name = "goFonDialOption_".$this->goFonDialOption[$i];
+ $name = "goFonDialOption".$this->goFonDialOption[$i];
$this->$name=$this->goFonDialOption[$i];
}
}
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'])){
- $this->is_account= !$this->is_account;
+ if(isset($_POST['modify_state'])){
+ if($this->is_account && $this->acl_is_removeable()){
+ $this->is_account= FALSE;
+ }elseif(!$this->is_account && $this->acl_is_createable()){
+ $this->is_account= TRUE;
+ }
}
/* Show tab dialog headers */
}
/* Add queue number */
- if(isset($_POST['add_phonenumber'])&&(isset($_POST['phonenumber']))&&(!empty($_POST['phonenumber']))){
- if((!in_array($_POST['phonenumber'],$this->telephoneNumber))&&(is_numeric($_POST['phonenumber']))){
- $this->telephoneNumber[]=$_POST['phonenumber'];
+ if($this->acl_is_writeable("telephoneNumber")){
+ if(isset($_POST['add_phonenumber'])&&(isset($_POST['phonenumber']))&&(!empty($_POST['phonenumber']))){
+ if((!in_array($_POST['phonenumber'],$this->telephoneNumber))&&(is_numeric($_POST['phonenumber']))){
+ $this->telephoneNumber[]=$_POST['phonenumber'];
+ }
}
}
/* Delete queue number */
- if(isset($_POST['delete_phonenumber'])&&(isset($_POST['goFonQueueNumber_List']))){
- unset($this->telephoneNumber[$_POST['goFonQueueNumber_List']]);
+ if($this->acl_is_writeable("telephoneNumber")){
+ if(isset($_POST['delete_phonenumber'])&&(isset($_POST['goFonQueueNumber_List']))){
+ unset($this->telephoneNumber[$_POST['goFonQueueNumber_List']]);
+ }
}
$tmp = array();
$this->telephoneNumber=$tmp;
/* queue number up */
- if(isset($_POST['up_phonenumber'])&&(isset($_POST['goFonQueueNumber_List']))){
- if($_POST['goFonQueueNumber_List']>0){
- $up = $this->telephoneNumber[$_POST['goFonQueueNumber_List']];
- $down = $this->telephoneNumber[$_POST['goFonQueueNumber_List']-1];
- $this->telephoneNumber[$_POST['goFonQueueNumber_List']] = $down;
- $this->telephoneNumber[$_POST['goFonQueueNumber_List']-1] = $up;
+ if($this->acl_is_writeable("telephoneNumber")){
+ if(isset($_POST['up_phonenumber'])&&(isset($_POST['goFonQueueNumber_List']))){
+ if($_POST['goFonQueueNumber_List']>0){
+ $up = $this->telephoneNumber[$_POST['goFonQueueNumber_List']];
+ $down = $this->telephoneNumber[$_POST['goFonQueueNumber_List']-1];
+ $this->telephoneNumber[$_POST['goFonQueueNumber_List']] = $down;
+ $this->telephoneNumber[$_POST['goFonQueueNumber_List']-1] = $up;
+ }
}
- }
- /* Queuenumber down */
- if(isset($_POST['down_phonenumber'])&&(isset($_POST['goFonQueueNumber_List']))){
- if(isset($this->telephoneNumber[($_POST['goFonQueueNumber_List']+1)])){
- $up = $this->telephoneNumber[$_POST['goFonQueueNumber_List']+1];
- $down = $this->telephoneNumber[$_POST['goFonQueueNumber_List']];
- $this->telephoneNumber[$_POST['goFonQueueNumber_List']+1] = $down;
- $this->telephoneNumber[$_POST['goFonQueueNumber_List']] = $up;
+ /* Queuenumber down */
+ if(isset($_POST['down_phonenumber'])&&(isset($_POST['goFonQueueNumber_List']))){
+ if(isset($this->telephoneNumber[($_POST['goFonQueueNumber_List']+1)])){
+ $up = $this->telephoneNumber[$_POST['goFonQueueNumber_List']+1];
+ $down = $this->telephoneNumber[$_POST['goFonQueueNumber_List']];
+ $this->telephoneNumber[$_POST['goFonQueueNumber_List']+1] = $down;
+ $this->telephoneNumber[$_POST['goFonQueueNumber_List']] = $up;
+ }
}
}
$smarty= get_smarty();
+ /* Set acls */
+ $tmp = $this->plInfo();
+ foreach($tmp['plProvidedAcls'] as $name => $translated){
+ $smarty->assign($name."ACL",$this->getacl($name));
+ }
+
$smarty->assign("goFonQueueLanguageOptions",array('de'=>_('German')));
$smarty->assign("goFonQueueStrategyOptions", $this->goFonQueueStrategyOptions);
}else{
$smarty->assign($val."CHK"," checked ");
}
-
- if(chkacl($this->acl,$key)==""){
- $smarty->assign($val."ACL","");
- }else{
- $smarty->assign($val."ACL"," disabled ");
- }
}
return ($display.$smarty->fetch (get_template_path('phonequeue.tpl', TRUE)));
}
$a_ext[$i]['app'] = "Queue";
$a_ext[$i]['appdata'] = $this->attrs['cn'][0].
"|".
- $this->goFonDialOption_t.
- $this->goFonDialOption_T.
- $this->goFonDialOption_h.
- $this->goFonDialOption_H.
- $this->goFonDialOption_r;
+ $this->goFonDialOptiont.
+ $this->goFonDialOptionT.
+ $this->goFonDialOptionh.
+ $this->goFonDialOptionH.
+ $this->goFonDialOptionr;
}
if($this->goFonQueueAnnounceHoldtime != false) {
{
plugin::save_object();
if(isset($_POST['phonenumber'])){
- foreach(array("goFonDialOption_t","goFonDialOption_T","goFonDialOption_h","goFonDialOption_r","goFonDialOption_H","goFonMusiconHold") as $val){
+ foreach(array("goFonDialOptiont","goFonDialOptionT","goFonDialOptionh","goFonDialOptionr","goFonDialOptionH","goFonMusiconHold") as $val){
if(isset($_POST[$val])){
$this->$val = $_POST[$val];
}else{
plugin::save();
$this->attrs['goFonDialOption'] = "";
- foreach(array("goFonDialOption_t","goFonDialOption_T","goFonDialOption_r","goFonDialOption_h","goFonDialOption_H","cn") as $val){
+ foreach(array("goFonDialOptiont","goFonDialOptionT","goFonDialOptionr","goFonDialOptionh","goFonDialOptionH","cn") as $val){
$this->attrs['goFonDialOption'].=$this->$val;
unset($this->attrs[$val]);
}
/* Remove all temporary attributes */
$tmp = array_flip($this->attributes);
- foreach(array("goFonDialOption_t","goFonDialOption_T","goFonDialOption_r","goFonDialOption_h","goFonDialOption_H","cn") as $val){
+ foreach(array("goFonDialOptiont","goFonDialOptionT","goFonDialOptionr","goFonDialOptionh","goFonDialOptionH","cn") as $val){
unset($this->$val);
unset($this->attrs[$val]);
unset($tmp[$val]);
"goFonTimeOut" => _("Timeout"),
"goFonMaxLen" => _("Max queue length"),
"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 *"),
+ "goFonDialOptiont" => _("Allow the called user to transfer his call"),
+ "goFonDialOptionT" => _("Allows calling user to transfer call"),
+ "goFonDialOptionh" => _("Allow the called to hangup by pressing *"),
+ "goFonDialOptionr" => _("Ring instead of playing background music"),
+ "goFonDialOptionH" => _("Allows calling to hangup by pressing *"),
"goFonMusiconHold" => _("Music on hold"),
"goFonWelcomeMusic" => _("Welcome music"),
index 95f7b52e49b278e362e3ca6defdb1476daa86b8d..9a2ea4046e900515ec2ca6671fa042befb999a34 100644 (file)
<table summary="{t}Generic queue Settings{/t}">
<tr>
<td>
- <select style="width:300px; height:60px;" name="goFonQueueNumber_List" size=6 {$telephoneNumberACL}>
+{render acl=$telephoneNumberACL}
+ <select style="width:300px; height:60px;" name="goFonQueueNumber_List" size=6>
{html_options options=$telephoneNumber}
<option disabled> </option>
</select>
+{/render}
</td>
<td style="vertical-align:center">
- <input type="submit" value="{t}Up{/t}" name="up_phonenumber" {$telephoneNumberACL}><br>
- <input type="submit" value="{t}Down{/t}" name="down_phonenumber" {$telephoneNumberACL}>
+{render acl=$telephoneNumberACL}
+ <input type="submit" value="{t}Up{/t}" name="up_phonenumber"><br>
+{/render}
+{render acl=$telephoneNumberACL}
+ <input type="submit" value="{t}Down{/t}" name="down_phonenumber">
+{/render}
</td>
</tr>
<tr>
<td colspan=2>
- <input name="phonenumber" size=20 align=middle maxlength=60 {$telephoneNumberACL} value="">
- <input type="submit" value="{t}Add{/t}" name="add_phonenumber" {$telephoneNumberACL}>
- <input type="submit" value="{t}Delete{/t}" name="delete_phonenumber" {$telephoneNumberACL}>
+{render acl=$telephoneNumberACL}
+ <input name="phonenumber" size=20 align=middle maxlength=60 value="">
+{/render}
+{render acl=$telephoneNumberACL}
+ <input type="submit" value="{t}Add{/t}" name="add_phonenumber" >
+{/render}
+{render acl=$telephoneNumberACL}
+ <input type="submit" value="{t}Delete{/t}" name="delete_phonenumber" >
+{/render}
</td>
</tr>
</table>
{t}Language{/t}
</td>
<td>
- <select name="goFonQueueLanguage" {$goFonQueueLanguageACL}>
+{render acl=$goFonQueueLanguageACL}
+ <select name="goFonQueueLanguage">
{html_options options=$goFonQueueLanguageOptions selected=$goFonQueueLanguage}
<option disabled> </option>
</select>
+{/render}
</td>
</tr>
<tr>
{t}Timeout{/t}
</td>
<td>
- <input name='goFonTimeOut' value='{$goFonTimeOut}' {$goFonTimeOutACL}>
+{render acl=$goFonTimeOutACL}
+ <input name='goFonTimeOut' value='{$goFonTimeOut}'>
+{/render}
</td>
</tr>
<tr>
{t}Retry{/t}
</td>
<td>
- <input name='goFonQueueRetry' value='{$goFonQueueRetry}' {$goFonQueueRetryACL}>
+{render acl=$goFonQueueRetryACL}
+ <input name='goFonQueueRetry' value='{$goFonQueueRetry}'>
+{/render}
</td>
</tr>
<tr>
{t}Strategy{/t}
</td>
<td>
- <select name="goFonQueueStrategy" {$goFonQueueStrategyACL}>
+{render acl=$goFonQueueStrategyACL}
+ <select name="goFonQueueStrategy">
{html_options options=$goFonQueueStrategyOptions selected=$goFonQueueStrategy}
<option disabled> </option>
</select>
+{/render}
</td>
</tr>
{t}Max queue length{/t}
</td>
<td>
- <input name='goFonMaxLen' value='{$goFonMaxLen}' {$goFonMaxLenACL}>
+{render acl=$goFonMaxLenACL}
+ <input name='goFonMaxLen' value='{$goFonMaxLen}'>
+{/render}
</td>
</tr>
<tr>
{t}Announce frequency{/t}
</td>
<td>
- <input name='goFonAnnounceFrequency' value='{$goFonAnnounceFrequency}' {$goFonAnnounceFrequencyACL}>
+{render acl=$goFonAnnounceFrequencyACL}
+ <input name='goFonAnnounceFrequency' value='{$goFonAnnounceFrequency}'>
+{/render}
{t}(in seconds){/t}
</td>
</tr>
{t}Use music on hold instead of ringing{/t}
</td>
<td>
- <input type="checkbox" name='goFonMusiconHold' value='1' {$goFonMusiconHoldCHK} {$goFonMusiconHoldACL}>
+{render acl=goFonMusiconHoldACL}
+ <input type="checkbox" name='goFonMusiconHold' value='1' {$goFonMusiconHoldCHK}>
+{/render}
</td>
</tr>
-->
{t}Music on hold{/t}
</td>
<td>
- <input type="text" style='width:250px;' name='goFonMusiconHold' value='{$goFonMusiconHold}' {$goFonMusiconHoldACL}>
+{render acl=$goFonMusiconHoldACL}
+ <input type="text" style='width:250px;' name='goFonMusiconHold' value='{$goFonMusiconHold}'>
+{/render}
</td>
</tr>
<tr>
{t}Welcome sound file{/t}
</td>
<td>
- <input type="text" style='width:250px;' name='goFonWelcomeMusic' value='{$goFonWelcomeMusic}' {$goFonWelcomeMusicACL}>
+{render acl=$goFonWelcomeMusicACL}
+ <input type="text" style='width:250px;' name='goFonWelcomeMusic' value='{$goFonWelcomeMusic}'>
+{/render}
</td>
</tr>
<tr>
{t}Announce message{/t}
</td>
<td>
- <input type="text" style='width:250px;' name='goFonQueueAnnounce' value='{$goFonQueueAnnounce}' {$goFonQueueAnnounceACL}>
+{render acl=$goFonQueueAnnounceACL}
+ <input type="text" style='width:250px;' name='goFonQueueAnnounce' value='{$goFonQueueAnnounce}'>
+{/render}
</td>
</tr>
<tr>
{t}Sound file for 'You are next ...'{/t}
</td>
<td>
- <input type="text" style='width:250px;' name='goFonQueueYouAreNext' value='{$goFonQueueYouAreNext}' {$goFonQueueYouAreNextACL}>
+{render acl=$goFonQueueYouAreNextACL}
+ <input type="text" style='width:250px;' name='goFonQueueYouAreNext' value='{$goFonQueueYouAreNext}'>
+{/render}
</td>
</tr>
<tr>
{t}'There are ...'{/t}
</td>
<td>
- <input type="text" style='width:250px;' name='goFonQueueThereAre' value='{$goFonQueueThereAre}' {$goFonQueueThereAreACL}>
+{render acl=$goFonQueueThereAreACL}
+ <input type="text" style='width:250px;' name='goFonQueueThereAre' value='{$goFonQueueThereAre}'>
+{/render}
</td>
</tr>
<tr>
{t}'... calls waiting'{/t}
</td>
<td>
- <input type="text" style='width:250px;' name='goFonQueueCallsWaiting' value='{$goFonQueueCallsWaiting}' {$goFonQueueCallsWaitingACL}>
+{render acl=$goFonQueueCallsWaitingACL}
+ <input type="text" style='width:250px;' name='goFonQueueCallsWaiting' value='{$goFonQueueCallsWaiting}'>
+{/render}
</td>
</tr>
<tr>
{t}'Thank you' message{/t}
</td>
<td>
- <input type="text" style='width:250px;' name='goFonQueueThankYou' value='{$goFonQueueThankYou}' {$goFonQueueThankYouACL}>
+{render acl=$goFonQueueThankYouACL}
+ <input type="text" style='width:250px;' name='goFonQueueThankYou' value='{$goFonQueueThankYou}'>
+{/render}
</td>
</tr>
<tr>
{t}'minutes' sound file{/t}
</td>
<td>
- <input type="text" style='width:250px;' name='goFonQueueMinutes' value='{$goFonQueueMinutes}' {$goFonQueueMinutesACL}>
+{render acl=$goFonQueueMinutesACL}
+ <input type="text" style='width:250px;' name='goFonQueueMinutes' value='{$goFonQueueMinutes}'>
+{/render}
</td>
</tr>
<tr>
{t}'seconds' sound file{/t}
</td>
<td>
- <input type="text" style='width:250px;' name='goFonQueueSeconds' value='{$goFonQueueSeconds}' {$goFonQueueSecondsACL}>
+{render acl=$goFonQueueSecondsACL}
+ <input type="text" style='width:250px;' name='goFonQueueSeconds' value='{$goFonQueueSeconds}'>
+{/render}
</td>
</tr>
<tr>
{t}Hold sound file{/t}
</td>
<td>
- <input type="text" style='width:250px;' name='goFonQueueReportHold' value='{$goFonQueueReportHold}' {$goFonQueueReportHoldACL}>
+{render acl=$goFonQueueReportHoldACL}
+ <input type="text" style='width:250px;' name='goFonQueueReportHold' value='{$goFonQueueReportHold}'>
+{/render}
</td>
</tr>
<tr>
{t}Less Than sound file{/t}
</td>
<td>
- <input type="text" style='width:250px;' name='goFonQueueLessThan' value='{$goFonQueueLessThan}' {$goFonQueueLessThanACL}>
+{render acl=$goFonQueueLessThanACL}
+ <input type="text" style='width:250px;' name='goFonQueueLessThan' value='{$goFonQueueLessThan}'>
+{/render}
</td>
</tr>
<table summary="" style="width: 100%; vertical-align: top; text-align: left;" border="0" cellpadding="0">
<tr>
<td colspan=2>
- <input type="checkbox" name='goFonQueueAnnounceHoldtime' value='yes' {$goFonQueueAnnounceHoldtimeCHK} {$goFonQueueAnnounceHoldtimeACL}>
+{render acl=$goFonQueueAnnounceHoldtimeACL}
+ <input type="checkbox" name='goFonQueueAnnounceHoldtime' value='yes' {$goFonQueueAnnounceHoldtimeCHK}{$goFonQueueAnnounceHoldtimeACL}>
+{/render}
{t}Announce holdtime{/t}
</td>
</tr>
<tr>
<td colspan=2>
- <input type="checkbox" name='goFonDialOption_t' value='t' {$goFonDialOption_tCHK} {$goFonDialOption_tACL}>
+{render acl=$goFonDialOptiontACL}
+ <input type="checkbox" name='goFonDialOptiont' value='t' {$goFonDialOptiontCHK}>
+{/render}
{t}Allow the called user to transfer his call{/t}
</td>
</tr>
<tr>
<td colspan=2>
- <input type="checkbox" name='goFonDialOption_T' value='T' {$goFonDialOption_TCHK} {$goFonDialOption_TACL}>
+{render acl=$goFonDialOptionTACL}
+ <input type="checkbox" name='goFonDialOptionT' value='T' {$goFonDialOptionTCHK}>
+{/render}
{t}Allows calling user to transfer call{/t}
</td>
</table>
<table summary="" style="width: 100%; vertical-align: top; text-align: left;" border="0" cellpadding="0">
<tr>
<td colspan=2>
- <input type="checkbox" name='goFonDialOption_h' value='h' {$goFonDialOption_hCHK} {$goFonDialOption_hACL}>
+{render acl=$goFonDialOptionhACL}
+ <input type="checkbox" name='goFonDialOptionh' value='h' {$goFonDialOptionhCHK}>
+{/render}
{t}Allow the called to hangup by pressing *{/t}
</td>
</tr>
<tr>
<td colspan=2>
- <input type="checkbox" name='goFonDialOption_H' value='H' {$goFonDialOption_HCHK} {$goFonDialOption_HACL}>
+{render acl=$goFonDialOptionHACL}
+ <input type="checkbox" name='goFonDialOptionH' value='H' {$goFonDialOptionHCHK}>
+{/render}
{t}Allows calling to hangup by pressing *{/t}
</td>
</tr>
<tr>
<td colspan=2>
- <input type="checkbox" name='goFonDialOption_r' value='r' {$goFonDialOption_rCHK} {$goFonDialOption_rACL}>
+{render acl=$goFonDialOptionrACL}
+ <input type="checkbox" name='goFonDialOptionr' value='r' {$goFonDialOptionrCHK}>
+{/render}
{t}Ring instead of playing background music{/t}
</td>
</tr>