From: cajus Date: Fri, 24 Jun 2005 09:03:29 +0000 (+0000) Subject: Unified layout for macro/phone dialog X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3f20f5b98138b053ec1a4de463ff10de47c704ba;p=gosa.git Unified layout for macro/phone dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@831 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/images/select_macro.png b/html/images/select_macro.png new file mode 100644 index 000000000..10d2a2d63 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 e9ec34749..0574074ad 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -97,7 +97,7 @@ class phoneAccount extends plugin $ldap->search("(objectClass=goFonMacro)", array("*")); /* Add none for no macro*/ - $this->macros['none']=_("none"); + $this->macros['none']=_("no macro"); $this->macro ="none"; @@ -140,6 +140,7 @@ class phoneAccount extends plugin }//is_array }//visible = 1 }//while + /* Go through already saved values, for a parameter */ $tmp = split("!",$this->goFonMacro); @@ -233,36 +234,38 @@ class phoneAccount extends plugin $str = $default; /* in case of a combo box display a combobox with selected attr */ - if($type == "combo"){ - $str="acl, "goFonMacro").">"; + foreach(split(":",$default) as $choice){ + if($choosen==$choice){ + $str.= "\n"; + }else{ + $str.= "\n"; + } } - } - $str.=""; - } + $str.=""; + $macrotab.= "$name$str"; + break; + case "bool": + if(!$choosen){ + $str="\n"; + }else{ + $str="\n"; + } + $macrotab.= "$str $name"; + break; - - /* Display switch for true false*/ - if($type == "bool"){ - if(!$choosen){ - $str="\n"; - }else{ - $str="\n"; - } - } + case "string": + $str="acl, "goFonMacro").">"; + $macrotab.= "$name$str"; + break; - /* display simple textfield */ - if($type=="string"){ - $str="acl, "goFonMacro").">"; } - - /* create table entry*/ - $macrotab.= "\n".$name."".$str.""; + $macrotab.= ""; } $macrotab.=""; diff --git a/plugins/gofon/phoneaccount/generic.tpl b/plugins/gofon/phoneaccount/generic.tpl index b6f74be04..a094c78fc 100644 --- a/plugins/gofon/phoneaccount/generic.tpl +++ b/plugins/gofon/phoneaccount/generic.tpl @@ -52,8 +52,7 @@
-
{t}Select macro{/t} - +  {t}Phone macro{/t}