summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6894a56)
raw | patch | inline | side by side (parent: 6894a56)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 24 Jun 2005 09:03:29 +0000 (09:03 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 24 Jun 2005 09:03:29 +0000 (09:03 +0000) |
html/images/select_macro.png | [new file with mode: 0644] | patch | blob |
plugins/gofon/phoneaccount/class_phoneAccount.inc | patch | blob | history | |
plugins/gofon/phoneaccount/generic.tpl | patch | blob | history |
diff --git a/html/images/select_macro.png b/html/images/select_macro.png
new file mode 100644 (file)
index 0000000..10d2a2d
Binary files /dev/null and b/html/images/select_macro.png differ
index 0000000..10d2a2d
Binary files /dev/null and b/html/images/select_macro.png differ
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index e9ec34749523bfd4a9152911a7e751fa069206ee..0574074ad03e3a48d54bb7023700c111d45b216a 100644 (file)
$ldap->search("(objectClass=goFonMacro)", array("*"));
/* Add none for no macro*/
- $this->macros['none']=_("none");
+ $this->macros['none']=_("no macro");
$this->macro ="none";
}//is_array
}//visible = 1
}//while
+
/* Go through already saved values, for a parameter */
$tmp = split("!",$this->goFonMacro);
$str = $default;
/* in case of a combo box display a combobox with selected attr */
- if($type == "combo"){
- $str="<select name='".$var."' ".chkacl($this->acl, "goFonMacro").">";
- foreach(split(":",$default) as $choice){
- if($choosen==$choice){
- $str.="\n<option name='".$var."' value='".$choice."' selected>".$choice."</option>";
- }else{
- $str.="\n<option name='".$var."' value='".$choice."'>".$choice."</option>";
+ $macrotab.= "<tr>";
+ switch ($type){
+
+ case "combo":
+ $str= "<select name='".$var."' ".chkacl($this->acl, "goFonMacro").">";
+ foreach(split(":",$default) as $choice){
+ if($choosen==$choice){
+ $str.= "\n<option name='".$var."' value='".$choice."' selected>".$choice."</option>";
+ }else{
+ $str.= "\n<option name='".$var."' value='".$choice."'>".$choice."</option>";
+ }
}
- }
- $str.="</select>";
- }
+ $str.="</select>";
+ $macrotab.= "<td>$name</td><td>$str";
+ break;
+ case "bool":
+ if(!$choosen){
+ $str="\n<input type='checkbox' name='".$var."' value='1'>";
+ }else{
+ $str="\n<input type='checkbox' name='".$var."' value='1' checked>";
+ }
+ $macrotab.= "<td colspan='2'>$str $name";
+ break;
-
- /* Display switch for true false*/
- if($type == "bool"){
- if(!$choosen){
- $str="\n<input type='checkbox' name='".$var."' value='1'>";
- }else{
- $str="\n<input type='checkbox' name='".$var."' value='1' checked>";
- }
- }
+ case "string":
+ $str="<input name='".$var."' value='".$choosen."' ".chkacl($this->acl, "goFonMacro").">";
+ $macrotab.= "<td>$name</td><td>$str";
+ break;
- /* display simple textfield */
- if($type=="string"){
- $str="<input name='".$var."' value='".$choosen."' ".chkacl($this->acl, "goFonMacro").">";
}
-
- /* create table entry*/
- $macrotab.= "\n<tr><td>".$name."</td><td>".$str."</td></tr>";
+ $macrotab.= "</td</tr>";
}
$macrotab.="</table>";
index b6f74be04326473c2b5c676e396a96b43144bff9..a094c78fc978bf347ce505ee1a070982712c90e7 100644 (file)
<br>
<table>
<tr>
- <td colspan=2>{t}Select macro{/t}
- <img src="images/select_phone.png">
+ <td colspan=2><img src="images/select_macro.png" align="center"> {t}Phone macro{/t}
<select name="macro" onchange="document.mainform.submit()" {$telephoneNumberACL}>
{html_options options=$macros selected=$macro}
</select>