Code

Updated tabs to show inherit instead of default
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 08:30:30 +0000 (08:30 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 08:30:30 +0000 (08:30 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3414 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_terminalGeneric.inc
plugins/admin/systems/class_terminalService.inc
plugins/admin/systems/class_terminalStartup.inc
plugins/admin/systems/class_workstationService.inc
plugins/admin/systems/class_workstationStartup.inc
plugins/admin/systems/terminal.tpl
plugins/admin/systems/terminalService.tpl
plugins/admin/systems/terminalStartup.tpl
plugins/admin/systems/workstationService.tpl

index 812b4f90f8ea6dd9a1d13e6f56c6ca9c5ce5d072..2aa43a34f335b2214c3170811a0850fbbab9a5f7 100644 (file)
@@ -243,7 +243,7 @@ class termgeneric extends plugin
 
         $tmp2[$servername.":".$path]= $servername.":".$path; 
       }else{
-        $tmp2[$server]=$server;
+        $tmp2[$server]="["._("inherited")."]";
       }
     }
   
index 9343af23bf0e52740f1372306edf090a0488109b..27caf1a013c288a7e02c2fe58108c2ab3e064ab3 100644 (file)
@@ -45,8 +45,8 @@ class termservice extends plugin
   var $XKbModels= array ();
   var $XKbLayouts= array ();
   var $XKbVariants= 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 $MouseTypes= array();
+  var $MousePorts= array();
   var $gotoScannerModels= array();
   var $hardware_list= array();
   var $used_hardware= array();
@@ -69,7 +69,7 @@ class termservice extends plugin
     array_unshift($this->XDrivers, "["._("unknown")."]");
     
     $this->XResolutions= array(
-        "default"   =>  _("inherited")  ,
+        "default"   =>  "["._("inherited")."]"  ,
         "640x480"   =>  "640x480",
         "800x600"   =>  "800x600",
         "1024x768"  =>  "1024x768",
@@ -79,13 +79,13 @@ class termservice extends plugin
         "1600x1200" =>  "1600x1200");
 
     $this->XColordepths= array(
-        "default"  => _("inherited"),
+        "default"  => "["._("inherited")."]",
         "8"        => "8 " ._("bit"),
         "15"       => "15 "._("bit"),
         "16"       => "16 "._("bit"),
         "24"       => "24 "._("bit"));
 
-    $this->XKbModels['default']= _("inherited");
+    $this->XKbModels['default']= "["._("inherited")."]";
     foreach(array ("btc9000", "chicony", "compaq", "dell", "dell101", "everex",
           "flexpro", "geniuscomfy", "hp", "itouch", "jp106", "logicordless",
           "logiinetnav", "logiinternet", "macintosh", "microsoft",
@@ -95,8 +95,17 @@ class termservice extends plugin
     }
 
     /* 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");
+    $this->XKbLayouts= array ("default"=>"["._("inherited")."]","de"=> "de","intl" =>"intl","us" =>"us");
+    $this->XKbVariants= array ("default"=>"["._("inherited")."]", "nodeadkeys"=>"nodeadkeys", "basic"=>"basic");
+
+    $this->MouseTypes= array( "AUTO"      =>  "["._("inherited")."]" ,  "ImPS/2"      => "ImPS/2", 
+                              "PS/2"      =>  "PS/2"                 ,  "Microsoft"   => "Microsoft", 
+                              "Logitech"  =>  "Logitech");
+
+    $this->MousePorts= array("AUTO"             =>"["._("inherited")."]"   , "/dev/ttyS0"  => "/dev/ttyS0", 
+                             "/dev/ttyS1"       => "/dev/ttyS1"            , "/dev/psaux"  => "/dev/psaux", 
+                             "/dev/input/mice"  =>"/dev/input/mice");
 
     /* try to read additional keyboard layouts
      */
index 589f89a7832aa69f718edcf7f2c78f34c08e3f85..e4d3412abf273d1767415fc05ca4aaa01f406f39 100644 (file)
@@ -8,13 +8,13 @@ class termstartup extends plugin
 
   /* Generic terminal attributes */
   var $bootmode= "G";
-  var $goLdapServerList= array("default");
+  var $goLdapServerList= array();
   var $gotoBootKernel= "";
   var $gotoKernelParameters= "";
   var $gotoLdapServer= "";
   var $gotoModules= array();
   var $gotoTerminalPath= "";
-  var $gotoBootKernels= array("default");
+  var $gotoBootKernels= array();
 
   /* Share */
   var $gotoShares         = array();// Currently Share Option
@@ -36,6 +36,8 @@ class termstartup extends plugin
   {
     plugin::plugin ($config, $dn);
 
+    $this->gotoBootKernels = array("default"=>"["._("inherited")."]");
+
     /* Get arrays */
     foreach (array("gotoModules") as $val){
       if (isset($this->attrs["$val"]["count"])){
@@ -101,7 +103,14 @@ class termstartup extends plugin
       }
 
     }
-
+    $tmp = $this->config->data['SERVERS']['LDAP'];  
+    foreach($tmp as $server){
+      $visible = $server;
+      if($server == "default"){
+        $visible = "["._("inherited")."]";
+      }
+      $this->goLdapServerList[$server] = $visible;
+    }
   }
 
   function execute()
@@ -173,9 +182,6 @@ class termstartup extends plugin
     $smarty->assign("gotoShares",$this->printOutAssignedShares());
     $smarty->assign("gotoShareKeys",array_flip($this->printOutAssignedShares()));
 
-    /* Arrays */
-    $tmp = $this->config->data['SERVERS']['LDAP'];
-
     /* Create divSelectBox for ldap server selection
      */
     $SelectBoxLdapServer = new divSelectBox("LdapServer");
@@ -185,7 +191,7 @@ class termstartup extends plugin
      *  or given entry is no longer available ...
      */
     $found = false;
-    foreach($tmp as $server){
+    foreach($this->goLdapServerList as $server => $name){
       if($this->gotoLdapServer==$server){
         $found = true;
       }
@@ -193,7 +199,7 @@ class termstartup extends plugin
     
     /* Add Entries
      */
-    foreach($tmp as $server){
+    foreach($this->goLdapServerList as $server => $visible){
       $use ="";
       if(($this->gotoLdapServer == $server) || ($found == false)) {
         $found = true;
@@ -202,7 +208,7 @@ class termstartup extends plugin
 
       $SelectBoxLdapServer->AddEntry(
           array(
-            array("string"=>$server),
+            array("string"=>$visible),
             array("string"=>"<input type='radio' name='gotoLdapServer' value='".$server."' ".$use.">",
                   "attach"=>"style='border-right:0px;'")
             ));
@@ -334,8 +340,10 @@ class termstartup extends plugin
     }
 
     /* Strip out 'default' values */
-    if ($this->attrs['gotoLdapServer'] == "default"){
-      unset ($this->attrs['gotoLdapServer']);
+    foreach(array("gotoBootKernel","gotoLdapServer") as $value){
+      if ($this->attrs[$value] == "default"){
+        $this->attrs[$value] = array();
+      } 
     }
 
      /* prepare share settings */
index debc29975071a289b7c506357435446b0f427180..315df0e52748dc72c9dd14bb18778ef87b562aa0 100644 (file)
@@ -38,8 +38,8 @@ class workservice extends plugin
 
   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 $MouseTypes= array();
+  var $MousePorts= array();
   var $hardware_list= array();
   var $used_hardware= array();
 
@@ -63,7 +63,7 @@ class workservice extends plugin
     plugin::plugin ($config, $dn);
 
     $this->XResolutions= array( 
-        "default"   =>  _("inherited")  ,
+        "default"   =>  "["._("inherited")."]",
         "640x480"   =>  "640x480",
         "800x600"   =>  "800x600",
         "1024x768"  =>  "1024x768",
@@ -75,13 +75,13 @@ class workservice extends plugin
     array_unshift($this->XDrivers, "["._("unknown")."]");
   
     $this->XColordepths= array( 
-        "default"  => _("inherited")
+        "default"  => "["._("inherited")."]"
         "8"        => "8 " ._("bit"), 
         "15"       => "15 "._("bit"),      
         "16"       => "16 "._("bit"),   
         "24"       => "24 "._("bit"));
 
-    $this->XKbModels['default']= _("inherited")
+    $this->XKbModels['default']= "["._("inherited")."]"
     foreach(array ("btc9000", "chicony", "compaq", "dell", "dell101", "everex",
           "flexpro", "geniuscomfy", "hp", "itouch", "jp106", "logicordless",
           "logiinetnav", "logiinternet", "macintosh", "microsoft",
@@ -90,9 +90,17 @@ class workservice extends plugin
       $this->XKbModels[$type] = $type;
     }
 
+    $this->MouseTypes= array("AUTO"     => "["._("inherited")."]", "ImPS/2"      =>"ImPS/2", 
+                             "PS/2"     => "PS/2",                "Microsoft"   =>"Microsoft", 
+                              "Logitech"=>"Microsoft");
+
+    $this->MousePorts= array("AUTO"             => "["._("inherited")."]", "/dev/ttyS0"  =>"/dev/ttyS0", 
+                             "/dev/ttyS1"       => "/dev/ttyS1",          "/dev/psaux"  =>"/dev/psaux", 
+                             "/dev/input/mice"  => "/dev/input/mice");
+
     /* 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");
+    $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 
      */
index 0d5fd2bf9159a8dd84217c9d07c6dc69ec35bbff..f187ef89ea48265f58278b9c4fdebdb5f361819e 100644 (file)
@@ -890,7 +890,7 @@ class workstartup extends plugin
     if ($this->attrs['gotoLdapServer'] == "default"){
       $this->attrs['gotoLdapServer']= array();
     }
-    if ($this->attrs['gotoBootKernel'] == "%default%"){
+    if ($this->attrs['gotoBootKernel'] == "%default%" || $this->attrs['gotoBootKernel'] == "default"){
       $this->attrs['gotoBootKernel']= array();
     }
 
index 8485c986231cbdbbb534cb7ed8da5c1164866032..fc29ba4076a74f5e093a7f96dfd53f9bfa2ed579 100644 (file)
@@ -54,7 +54,7 @@
      <td><LABEL for="gotoTerminalPath">{t}Root server{/t}</LABEL></td>
      <td>
       <select name="gotoTerminalPath" id="gotoTerminalPath" title="{t}Select NFS root filesystem to use{/t}" {$gotoTerminalPathACL}>
-       {html_options values=$nfsservers output=$nfsservers selected=$gotoTerminalPath_select}
+       {html_options options=$nfsservers selected=$gotoTerminalPath_select}
       </select>
      </td>
     </tr>
@@ -62,7 +62,7 @@
      <td><LABEL for="gotoSwapServer">{t}Swap server{/t}</LABEL></td>
      <td>
       <select name="gotoSwapServer" id="gotoSwapServer" title="{t}Choose NFS filesystem to place swap files on{/t}" {$gotoSwapServerACL}>
-       {html_options values=$nfsservers output=$nfsservers selected=$gotoSwapServer_select}
+       {html_options options=$nfsservers selected=$gotoSwapServer_select}
       </select>
      </td>
     </tr>
index 50d4645d36482a21a5fd6182fe44eb12be8ec16d..db8fc0e295597ec1827b3d730bd0c9d8c0ac1dc7 100644 (file)
@@ -42,7 +42,7 @@
      <td><LABEL for="gotoXMouseType">{t}Type{/t}</LABEL></td>
      <td>
       <select name="gotoXMouseType" id="gotoXMouseType" title="{t}Choose mouse type{/t}" {$gotoXMouseTypeACL}>
-       {html_options values=$MouseTypes output=$MouseTypes selected=$gotoXMouseType_select}
+       {html_options options=$MouseTypes selected=$gotoXMouseType_select}
       </select>
      </td>
     </tr>
@@ -50,7 +50,7 @@
      <td><LABEL for="gotoXMouseport">{t}Port{/t}</LABEL></td>
      <td>
       <select id="gotoXMouseport" name="gotoXMouseport" title="{t}Choose mouse port{/t}" {$gotoXMouseportACL}>
-       {html_options values=$MousePorts output=$MousePorts selected=$gotoXMouseport_select}
+       {html_options options=$MousePorts selected=$gotoXMouseport_select}
       </select>
      </td>
     </tr>
index 6f332c1b66e026a16267d61acd5fac72017d38c5..39ae8c8237471248dd32c07753b2a8b609b5e0cc 100644 (file)
@@ -13,7 +13,7 @@
      <td style="width:30%"><LABEL for="gotoBootKernel">{t}Boot kernel{/t}</LABEL></td>
      <td>
        <select id="gotoBootKernel" name="gotoBootKernel" {$gotoBootKernelACL} onchange='document.mainform.submit()'>
-       {html_options values=$gotoBootKernels output=$gotoBootKernels selected=$gotoBootKernel}
+       {html_options options=$gotoBootKernels  selected=$gotoBootKernel}
        <option disabled>&nbsp;</option>
        </select>
      </td>
index 87f45142beceeab71f8658db4279086c522055fc..54ddff5ee19d37152ae014ff73f6914ab0b6a0ce 100644 (file)
@@ -42,7 +42,7 @@
      <td><LABEL for="gotoXMouseType">{t}Type{/t}</LABEL></td>
      <td>
       <select name="gotoXMouseType" id="gotoXMouseType" title="{t}Choose mouse type{/t}" {$gotoXMouseTypeACL}>
-       {html_options values=$MouseTypes output=$MouseTypes selected=$gotoXMouseType_select}
+       {html_options options=$MouseTypes selected=$gotoXMouseType_select}
       </select>
      </td>
     </tr>
@@ -50,7 +50,7 @@
      <td><LABEL for="gotoXMouseport">{t}Port{/t}</LABEL></td>
      <td>
       <select id="gotoXMouseport" name="gotoXMouseport" title="{t}Choose mouse port{/t}" {$gotoXMouseportACL}>
-       {html_options values=$MousePorts output=$MousePorts selected=$gotoXMouseport_select}
+       {html_options options=$MousePorts selected=$gotoXMouseport_select}
       </select>
      </td>
     </tr>