From 3f20f5b98138b053ec1a4de463ff10de47c704ba Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 24 Jun 2005 09:03:29 +0000 Subject: [PATCH] Unified layout for macro/phone dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@831 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/images/select_macro.png | Bin 0 -> 927 bytes .../gofon/phoneaccount/class_phoneAccount.inc | 55 +++++++++--------- plugins/gofon/phoneaccount/generic.tpl | 3 +- 3 files changed, 30 insertions(+), 28 deletions(-) create mode 100644 html/images/select_macro.png diff --git a/html/images/select_macro.png b/html/images/select_macro.png new file mode 100644 index 0000000000000000000000000000000000000000..10d2a2d63618145b376b24f0ba45587f433ec9d4 GIT binary patch literal 927 zcmV;Q17Q4#P)z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZ<6-h)vRCwBA{Qv(y10?_;fEd%#(!eIXdiCnV`t|Dt zLF|Blfd5~ub3EFjIP`Hc*R9{*?f_4_AKl!1YjjUA%-4+Fz*ApZL6AH(O* zpApVR0ssL7cY#NCFW3Pf>BqM(GaOkpi9u6Cjp40mFoX2xZ45ttdh=}_C|J@BZ z2J!#BzV`puo4fy`qN3je1P}|zRB&urf7ytr@2^26ho3a@GF#cz__xK|iKYsp+fs>Pq;n!baxG?cD z{9+Yl`1zL!g1@{52Fxpl*!)%oU^EK?1Q7G>+jri_RQ7T3$q6x7Sx7M)IQ*F5>BFZC zmtOKQe0Xqz!PQKdf%)%S1{S6tV9dzG$nfOM28I}S35J-WISl{-#KObFE%5)(R|Zjb zK?Y7{1_nufR)#BYe=_9SzhY=EuxDWSbeDnQ3(#x-|AM{1{Ph8Y!2jzEAK$AmeE)9029U=hMS7<3>_Q( zF#rS*3n(C9i2|k(1X^1={x4qS2TWB!GsT}VFx=k)kx)}(V7T>zfq{hum^MCs00i?TJuNVLV3;>~eh$6%nEMWiu002ovPDHLkV1nTN BlGFeI literal 0 HcmV?d00001 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} -- 2.30.2