Code

Add asterisk for required attributes in network.tpl
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 May 2005 12:36:02 +0000 (12:36 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 May 2005 12:36:02 +0000 (12:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@549 594d385d-05f5-0310-b6e9-bd551577e9d8

12 files changed:
plugins/admin/systems/class_componentGeneric.inc
plugins/admin/systems/class_phoneGeneric.inc
plugins/admin/systems/class_printGeneric.inc
plugins/admin/systems/class_servDB.inc
plugins/admin/systems/class_servGeneric.inc
plugins/admin/systems/class_servService.inc
plugins/admin/systems/class_terminalGeneric.inc
plugins/admin/systems/class_terminalInfo.inc
plugins/admin/systems/class_terminalService.inc
plugins/admin/systems/class_winGeneric.inc
plugins/admin/systems/class_workstationGeneric.inc
plugins/admin/systems/network.tpl

index 4c850812879a4e54194c56de1bca65ee42ddda26..139444563bd4fcddf36b9c266d0833a5a5c4e155 100644 (file)
@@ -60,6 +60,9 @@ class componentGeneric extends plugin
     }
     $smarty->assign("base_select", $this->base);
 
+    /* Show Asterisk for required attribute ipHostNumber and macAddress */
+    $smarty->assign("staticAddress", "<font class=\"must\">*</font>");
+    
     /* Show main page */
     $smarty->assign("netconfig", dirname(__FILE__)."/network.tpl");
     return($smarty->fetch (get_template_path('component.tpl', TRUE)));
index 2e788e1cf57f99b718fd9250aa9e555f0ebb1aed..417b6b31cf3dd36209ac27cf8baaccd0813ca454 100644 (file)
@@ -59,7 +59,10 @@ class phoneGeneric extends plugin
       $smarty->assign("$attr", $this->$attr);
     }
     $smarty->assign("base_select", $this->base);
-
+    
+    /* Show Asterisk for required attribute ipHostNumber and macAddress */
+    $smarty->assign("staticAddress", "<font class=\"must\">*</font>");
+        
     /* Show main page */
     $smarty->assign("netconfig", dirname(__FILE__)."/network.tpl");
     return($smarty->fetch (get_template_path('phone.tpl', TRUE)));
index c816cc23489838c5fefd84be915953b839b7db4f..b662fae88daaea38180fda7b590809da99779fce 100644 (file)
@@ -69,6 +69,9 @@ class printgeneric extends plugin
     }
     $smarty->assign("base_select", $this->base);
 
+    /* Don't show Asterisk for non-required attribute ipHostNumber and macAddress */
+    $smarty->assign("staticAddress", "");
+    
     /* Show main page */
     $smarty->assign("netconfig", dirname(__FILE__)."/network.tpl");
     return($smarty->fetch (get_template_path('printer.tpl', TRUE)));
index c6e38f25c6f61e48043b02a36c2f6a06f2fa1b70..12612a580b17d6b71fdf25c6c0382a520db21e7b 100644 (file)
@@ -71,6 +71,9 @@ class servdb extends plugin
       $smarty->assign("$attr"."ACL", chkacl($this->acl, $attr));
     }
 
+    /* Don't show Asterisk for non-required attribute ipHostNumber and macAddress */
+    $smarty->assign("staticAddress", "");
+
     /* Classes... */
     foreach ($this->additionaloc as $oc => $dummy){
       if (isset($this->objectclasses[$oc])){
index c081b412ae90c7cb550eb7adf27f6355312cb04d..12c1c309dc3be2ddb7b9c2333fd92a30ec828883 100644 (file)
@@ -100,6 +100,7 @@ class servgeneric extends plugin
       $smarty->assign($attr."ACL", chkacl($this->acl, $attr));
       $smarty->assign("$attr", $this->$attr);
     }
+    $smarty->assign("staticAddress", "");
     $smarty->assign("base_select", $this->base);
 
     /* Assign status */
index bff759aab738c52162301483a1c710e13edc71b1..3c6fae64c4c4db91ef6e2dddc6b1cc7be17b9330 100644 (file)
@@ -61,6 +61,8 @@ class servservice extends plugin
     $smarty= get_smarty();
 
     
+    $smarty->assign("staticAddress", "");
+      
     /*  
     Handling for Nfs Export Entries
     */
index 99b11ba7efa0612b9913dd9b1166f92958774826..e639e1636edd26b1e43af4aaeaaf694b8c976e2a 100644 (file)
@@ -131,6 +131,7 @@ class termgeneric extends plugin
     /* Fill templating stuff */
     $smarty= get_smarty();
     $smarty->assign("cn", $this->cn);
+    $smarty->assign("staticAddress", "");
 
     $smarty->assign("bases", $this->config->idepartments);
 
index 4b41bfbfdfd8603d1f49b7255881e2f0c0a5ca13..46eb02226924d55c889c327a69fd475dcd188b4d 100644 (file)
@@ -73,6 +73,8 @@ class terminfo extends plugin
       $smarty= get_smarty();
       $display= "";
 
+      $smarty->assign("staticAddress", "");
+   
       /* Check if terminal is online */
       $query= "fping -q -r 1 -t 500 ".$this->cn;
       exec ($query, $dummy, $retval);
index 0d5b0b8518da7b18cf4381e4a5fbbc61778a30f4..d04d110a099f8f33985d83ceff19a795f1d8044d 100644 (file)
@@ -166,6 +166,7 @@ class termservice extends plugin
       $smarty->assign($val, $this->$val);
       $smarty->assign($val."ACL", chkacl($this->acl, $val));
     }
+    $smarty->assign("staticAddress", "");
 
     /* Checkboxes */
     foreach(array("gotoLpdEnable", "gotoScannerEnable") as $val){
index 82b5a25c9fe92876db53931c8b5b820a45f5e590..a9533636a93d81bf65561a76478afe137a540ae8 100644 (file)
@@ -84,6 +84,8 @@ class wingeneric extends plugin
       $smarty->assign("$attr", $this->$attr);
     }
     
+    /* Show Asterisk for required attribute ipHostNumber and macAddress */
+    $smarty->assign("staticAddress", "<font class=\"must\">*</font>");
     
     $smarty->assign("base_select", $this->base);
 
index cf9c8b9d25ac26ee51719b540bf142aff3472b7e..1a82a1ae0eed1a97b969a3fbce78eb4ef2fdbc8b 100644 (file)
@@ -141,7 +141,8 @@ class workgeneric extends plugin
     $smarty= get_smarty();
     $smarty->assign("cn", $this->cn);
     $smarty->assign("bases", $this->config->idepartments);
-
+    $smarty->assign("staticAddress", "");
+        
     /* Check if workstation is online */
     $query= "fping -q -r 1 -t 500 ".$this->cn;
     exec ($query, $dummy, $retval);
index 4700d7b5f7379a8a803e7ea95e0224745c65a9eb..93b3cb9b6cb2edf9fe487250b120a1409bf1d734 100644 (file)
@@ -5,7 +5,7 @@
   <td>
    <table>
     <tr>
-     <td>{t}IP-address{/t}</td>
+     <td>{t}IP-address{/t}{$staticAddress}</td>
      <td><input name="ipHostNumber" size=25 maxlength=80 value="{$ipHostNumber}"></td>
     </tr>
    </table>
@@ -13,7 +13,7 @@
   <td>
    <table>
     <tr>
-     <td>{t}MAC-address{/t}</td>
+     <td>{t}MAC-address{/t}{$staticAddress}</td>
      <td><input name="macAddress" size=25 maxlength=80 value="{$macAddress}"></td>
     </tr>
    </table>