Code

Fixed layout, allow special chars in macroname
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Aug 2005 14:20:51 +0000 (14:20 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Aug 2005 14:20:51 +0000 (14:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1128 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/macro/class_gofonMacroParameters.inc
plugins/gofon/phoneaccount/class_phoneAccount.inc

index 928f3227b627a537cb93d2513103ecef8a95f71e..ed7cf2abaccf70f968f2611f51ed9a4de583fec7 100755 (executable)
@@ -90,7 +90,7 @@ class macroParameter extends plugin
     foreach($this->goFonMacroParameter as $para){
       $tmp = split("!",$para);
       $num = $tmp[0];
-      $tmp2[$num]['name']        = $tmp[1];
+      $tmp2[$num]['name']        = base64_decode($tmp[1]);
       $tmp2[$num]['type']        = $tmp[2];
       $tmp2[$num]['default']     = $tmp[3];
       $tmp2[$num]['var']         = "var".$num;
@@ -356,7 +356,7 @@ class macroParameter extends plugin
     $this->attrs['goFonMacroParameter']=array();
 
     foreach($this->goFonMacroParameter as $key=>$fonpara){
-      $this->attrs['goFonMacroParameter'][]=$key."!".$fonpara['name']."!".$fonpara['type']."!".$fonpara['default'];
+      $this->attrs['goFonMacroParameter'][]=$key."!".base64_encode($fonpara['name'])."!".$fonpara['type']."!".$fonpara['default'];
     }
 
     if($this->para_count != count($this->attrs['goFonMacroParameter'])){
index 2232b09839f0166a4329ba7e72de10d0b0d47c50..9741b68aff921b6560e555c843b3ed2707a7f570 100644 (file)
@@ -524,7 +524,7 @@ class phoneAccount extends plugin
       $macrotab="";
     }else{
 
-      $macrotab ="<table summary=\""._("Parameter")."\" width='100%'>";
+      $macrotab ="<table summary=\""._("Parameter")."\">";
       /* for every single parameter-> display textfile,combo, or true false switch*/
 
 
@@ -586,16 +586,16 @@ class phoneAccount extends plugin
             }else{
               $str="\n<input type='checkbox' name='".$var."' value='1' checked  ".chkacl($this->acl, "goFonMacro").">";
             }
-          $macrotab.= "<td colspan='2'>$str&nbsp;$name";
+          $macrotab.= "<td colspan='2'>$str&nbsp;".base64_decode($name)."";
           break;
 
           case "string":
             $str="<input name='".$var."' value='".$choosen."' ".chkacl($this->acl, "goFonMacro")." style='width:340px;'>";
-          $macrotab.= "<td colspan='2'>$name</td></tr><tr><td colspan='2' style='width:350px'>$str";
+          $macrotab.= "<td>".base64_decode($name)."</td><td>$str";
           break;
 
         }
-        $macrotab.= "</td></tr><tr><td colspan='2'>&nbsp;</td></tr>";
+        $macrotab.= "</td></tr>";
 
       }
       $macrotab.="</table><input name='post_success' type='hidden' value='1'>";