Code

default is now visible as _("inherited")
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 07:15:33 +0000 (07:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 07:15:33 +0000 (07:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3404 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_workstationService.inc
plugins/admin/systems/workstationService.tpl

index ba1cdf865aa685be457e2f4e1c128b201926d4bd..23497214afa00c60dfcd1c4a497c2d43a22845af 100644 (file)
@@ -35,18 +35,9 @@ class workservice extends plugin
       "i128", "i740", "i810", "imstt", "mga", "neomagic", "newport", "nsc",  "nv",
       "r128", "radeon", "rendition", "s3", "s3virge", "savage", "siliconmotion",
       "sis", "tdfx", "tga", "trident", "tseng", "vesa", "vga", "vmware");
-  var $XResolutions= array("default", "640x480", "800x600", "1024x768", "1152x864", "1280x1024",
-      "1400x1050", "1600x1200");
-  var $XColordepths= array("default", "8", "15", "16", "24");
-  var $XKbModels= array ("default", "btc9000", "chicony", "compaq", "dell", "dell101", "everex",
-      "flexpro", "geniuscomfy", "hp", "itouch", "jp106", "logicordless",
-      "logiinetnav", "logiinternet", "macintosh", "microsoft",
-      "microsoftpro", "omnikey101", "pc101", "pc102", "pc104",
-      "pc105", "rapidaccess", "rapidaccess2", "winbook");
-
-                    /* Additional values will be extracted from /etc/gosa/keyboardLayouts */
-  var $XKbLayouts= array ("default"=>"default","de"=> "de","intl" =>"intl","us" =>"us");
-  var $XKbVariants= array ("default", "nodeadkeys", "basic");
+
+  var $XResolutions = array();
+
   var $MouseTypes= array("AUTO", "ImPS/2", "PS/2", "Microsoft", "Logitech");
   var $MousePorts= array("AUTO", "/dev/ttyS0", "/dev/ttyS1", "/dev/psaux", "/dev/input/mice");
   var $hardware_list= array();
@@ -62,10 +53,45 @@ class workservice extends plugin
       "gotoXMouseType", "gotoXMouseport", "goFonHardware");
   var $objectclasses= array("GOhard");
 
+  var $XColordepths     =array();
+  var $XKbModels        =array();
+  var $XKbLayouts       =array();
+  var $XKbVariants      =array();
+
   function workservice ($config, $dn= NULL)
   {
     plugin::plugin ($config, $dn);
 
+    $this->XResolutions= array( 
+        "default"   =>  _("inherited")  ,
+        "640x480"   =>  "640x480",
+        "800x600"   =>  "800x600",
+        "1024x768"  =>  "1024x768",
+        "1152x864"  =>  "1152x864", 
+        "1280x1024" =>  "1280x1024",
+        "1400x1050" =>  "1400x1050", 
+        "1600x1200" =>  "1600x1200");
+
+    $this->XColordepths= array( 
+        "default"  => _("inherited"), 
+        "8"        => "8 " ._("bit"), 
+        "15"       => "15 "._("bit"),      
+        "16"       => "16 "._("bit"),   
+        "24"       => "24 "._("bit"));
+
+    $this->XKbModels['default']= _("inherited"); 
+    foreach(array ("btc9000", "chicony", "compaq", "dell", "dell101", "everex",
+          "flexpro", "geniuscomfy", "hp", "itouch", "jp106", "logicordless",
+          "logiinetnav", "logiinternet", "macintosh", "microsoft",
+          "microsoftpro", "omnikey101", "pc101", "pc102", "pc104",
+          "pc105", "rapidaccess", "rapidaccess2", "winbook") as $type){
+      $this->XKbModels[$type] = $type;
+    }
+
+    /* Additional values will be extracted from /etc/gosa/keyboardLayouts */
+    $this->XKbLayouts= array ("default"=>_("inherited"),"de"=> "de","intl" =>"intl","us" =>"us");
+    $this->XKbVariants= array ("default"=>_("inherited"), "nodeadkeys"=>"nodeadkeys", "basic"=>"basic");
+
     /* try to read additional keyboard layouts 
      */
     if(file_exists(CONFIG_DIR."/keyboardLayouts")){
@@ -83,7 +109,7 @@ class workservice extends plugin
         }
       }
     }
-    
+
     /* Initialize methods */
     $this->XMethods["default"]= _("default");
     $this->XMethods["indirect"]= _("show chooser");
@@ -136,8 +162,8 @@ class workservice extends plugin
 
   function execute()
   {
-       /* Call parent execute */
-       plugin::execute();
+    /* Call parent execute */
+    plugin::execute();
 
     /* Do we need to flip is_account state? */
     if (isset($_POST['modify_state'])){
@@ -197,8 +223,8 @@ class workservice extends plugin
     /* Phone stuff */
     $smarty->assign ("goFonHardware", $this->goFonHardware);
     $hl= "<select size=\"1\" name=\"goFonHardware\" title=\"".
-         _("Choose the phone located at the current terminal")."\" ".
-         chkacl($this->acl, "goFonHardware").">\n";
+      _("Choose the phone located at the current terminal")."\" ".
+      chkacl($this->acl, "goFonHardware").">\n";
     foreach ($this->hardware_list as $cn => $description){
       if ($cn == $this->goFonHardware){
         $selected= "selected";
@@ -229,7 +255,7 @@ class workservice extends plugin
 
   function remove_from_parent()
   {
-      $this->handle_post_events("remove");
+    $this->handle_post_events("remove");
   }
 
   /* Save data to object */
index 08d598125fbdea20dbb3ce415bd361d9fbb484d5..87f45142beceeab71f8658db4279086c522055fc 100644 (file)
@@ -7,7 +7,7 @@
      <td><LABEL for="gotoXKbModel">{t}Model{/t}</LABEL></td>
      <td>
       <select id="gotoXKbModel" name="gotoXKbModel" title="{t}Choose keyboard model{/t}" {$gotoXKbModelACL}>
-       {html_options values=$XKbModels output=$XKbModels selected=$gotoXKbModel_select}
+       {html_options options=$XKbModels selected=$gotoXKbModel_select}
       </select>
      </td>
     </tr>
@@ -15,7 +15,7 @@
      <td><LABEL for="gotoXKbLayout">{t}Layout{/t}</LABEL></td>
      <td>
       <select id="gotoXKbLayout" name="gotoXKbLayout" title="{t}Choose keyboard layout{/t}" {$gotoXKbLayoutACL}>
-       {html_options values=$XKbLayoutKeys output=$XKbLayouts selected=$gotoXKbLayout_select}
+       {html_options options=$XKbLayouts selected=$gotoXKbLayout_select}
       </select>
      </td>
     </tr>
@@ -23,7 +23,7 @@
      <td><LABEL for="gotoXKbVariant">{t}Variant{/t}</LABEL></td>
      <td>
       <select id="gotoXKbVariant" name="gotoXKbVariant" title="{t}Choose keyboard variant{/t}" {$gotoXKbVariantACL}>
-       {html_options values=$XKbVariants output=$XKbVariants selected=$gotoXKbVariant_select}
+       {html_options options=$XKbVariants selected=$gotoXKbVariant_select}
       </select>
      </td>
     </tr>
@@ -94,7 +94,7 @@
      <td><LABEL for="gotoXResolution">{t}Resolution{/t}</LABEL></td>
      <td>
       <select id="gotoXResolution" name="gotoXResolution" title="{t}Choose screen resolution used in graphic mode{/t}" {$gotoXResolutionACL}>
-       {html_options values=$XResolutions output=$XResolutions selected=$gotoXResolution_select}
+       {html_options options=$XResolutions selected=$gotoXResolution_select}
       </select>
      </td>
     </tr>
      <td><LABEL for="gotoXColordepth">{t}Color depth{/t}</LABEL></td>
      <td>
       <select id="gotoXColordepth" name="gotoXColordepth" title="{t}Choose colordepth used in graphic mode{/t}" {$gotoXColordepthACL}>
-       {html_options values=$XColordepths output=$XColordepths selected=$gotoXColordepth_select}
+       {html_options options=$XColordepths selected=$gotoXColordepth_select}
       </select>
      </td>
     </tr>