summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: df26d7c)
raw | patch | inline | side by side (parent: df26d7c)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 25 Oct 2006 07:39:54 +0000 (07:39 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 25 Oct 2006 07:39:54 +0000 (07:39 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4937 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc
index efe792ca8cb41f499f931bd6ba8db8ae3140e626..ef2332d83ce9370877ba6007863d624a88c5a43c 100644 (file)
}
/* Fill templating stuff */
- $smarty->assign("bases", $this->config->idepartments);
+ $smarty->assign("bases", $this->get_allowed_bases());
$smarty->assign("base_select", $this->base);
$smarty->assign("types", array(0 => _("send"), 1 => _("receive")));
if ($this->dn == "new" || preg_match ("/,ou=incoming,/", $this->dn)){
diff --git a/plugins/gofon/macro/class_gofonMacroParameters.inc b/plugins/gofon/macro/class_gofonMacroParameters.inc
index 4815c6e224a31a7843a4749ff84b58b28859e9cd..5a1aacfc0bb62e2186f1249cdf9270c128cb779a 100755 (executable)
*/
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
/* Variables */
$vars = "";
$tmp = array();
$number = 0;
-
+
+ /* Get acls for this tab,
+ there is only one attribute to write,
+ so we use the acls from gofon/marco */
+ $ACLs = $this->ui->get_permissions($this->dn,"gofon/macro","goFonMarcoContent");
+
+ /* get current content */
$content = $_SESSION['macroManagment']->macrotabs->by_object['macro']->goFonMacroContent;
if(strstr($content,"ARG")){
/* Fill templating stuff */
$smarty= get_smarty();
- /* Assign all vars to Smarty */
- foreach($this->attributes as $ar){
- $smarty->assign($ar, $this->$ar);
- }
-
/* Add an empty Parameter */
- if(isset($_POST['addvar'])){
+ if(isset($_POST['addvar']) && preg_match("/w/",$ACLs)){
if(!is_array($this->goFonMacroParameter)){
$vars = $this->goFonMacroParameter;
$this->goFonMacroParameter = array();
/* Sort by Parameterid, and keep keys */
ksort($FonParas);
- foreach($FonParas as $key=>$para) {
+
- /* Select correct item of combobox */
- if(isset($para['type'])){
- list($sel1, $sel2, $sel3)= $this->type_shortcut[$para['type']];
- }else{
- list($sel1, $sel2, $sel3)= array("", "", "");
- }
+ if(!preg_match("/r/",$ACLs)){
+ $smarty->assign("readable",false);
+ }else{
+ $smarty->assign("readable",true);
+ foreach($FonParas as $key=>$para) {
+
+ /* Select correct item of combobox */
+ if(isset($para['type'])){
+ list($sel1, $sel2, $sel3)= $this->type_shortcut[$para['type']];
+ }else{
+ list($sel1, $sel2, $sel3)= array("", "", "");
+ }
+
+ /* Disable all input fields if we are not allowed to change the parameters */
+ $disabled = "";
+ if(!preg_match("/w/",$ACLs)){
+ $key = "";
+ $disabled = " disabled ";
+ }
- /* Assemble output table */
- $vars .="<tr>
- <td>
- <input name=\"number".$key."\" value='".$key."' type='hidden'>
- <input name='var".$key."' type='hidden' value='".$para['var']."'>ARG".$key."
- </td>
- <td><input size=\"45\" name='varname".$key."' value='".$para['name']."'></td>
- <td>
- <select name='vartype".$key."'>
- <option value='string' ".$sel1.">"._("String")." </option>
- <option value='combo' ".$sel2.">"._("Combobox")." </option>
- <option value='bool' ".$sel3.">"._("Bool")." </option>
- </select>
- </td>
- <td><input size=\"45\" name='default".$key."' value='".$para['default']."'></td>
- <td> ";
- if($para['check']==false) {
- $vars.="<input name='del".$key."' value='"._("Delete unused")."' type='submit'>";
- }
+ /* Assemble output table */
+ $vars .="<tr>
+ <td>
+ <input name=\"number".$key."\" value='".$key."' type='hidden' ".$disabled.">
+ <input name='var".$key."' type='hidden' value='".$para['var']."' ".$disabled.">ARG".$key."
+ </td>
+ <td><input size=\"45\" name='varname".$key."' value='".$para['name']."' ".$disabled."></td>
+ <td>
+ <select name='vartype".$key."' ".$disabled.">
+ <option value='string' ".$sel1.">"._("String")." </option>
+ <option value='combo' ".$sel2.">"._("Combobox")." </option>
+ <option value='bool' ".$sel3.">"._("Bool")." </option>
+ </select>
+ </td>
+ <td><input size=\"45\" name='default".$key."' value='".$para['default']."' ".$disabled."></td>
+ <td> ";
+ if($para['check']==false) {
+ $vars.="<input name='del".$key."' value='"._("Delete unused")."' type='submit'>";
+ }
- $vars.=" </td></tr>";
+ $vars.=" </td></tr>";
+ }
}
/* Checkboxes */
/* Set Post vars */
$key = $_POST[$name];
-
+
$this->goFonMacroParameter[$key]['var'] = $_POST["var".$key];
$this->goFonMacroParameter[$key]['name'] = $_POST["varname".$key];
$this->goFonMacroParameter[$key]['type'] = $_POST["vartype".$key];
index 79c50c642d7facd7e0688dc6ac8d831e339a5ded..cf17055bd3cce5d52b992c7cba7535344258b185 100755 (executable)
+{if $readable}
<table width="100%" summary="">
<tr>
<td>{t}Argument{/t}
</tr>
{$vars}
</table>
-
+{else}
+ <h2>{t}You are not allowed to view the marco parameter settings{/t}</h2>
+{/if}
<input type="hidden" name="phoneparemeters">
<!-- Place cursor -->