Code

Added some new *must* fields for hotplugs
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Sep 2006 07:37:49 +0000 (07:37 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Sep 2006 07:37:49 +0000 (07:37 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4637 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_hotplugDialog.inc
plugins/personal/environment/hotplugDialogNew.tpl

index 61989f959eac2c338b75ecabc7c5f7d7d4dfd732..8bf8ae2980bec583493876f364ae755aef0f1a73 100644 (file)
@@ -130,13 +130,13 @@ class hotplugDialog extends plugin
         $message[]=_("Invalid character in description. Please specify a valid description.");
       }
 
-      if(preg_match("/[\|\*]/i",$this->HOT_id)){
+      if(empty($this->HOT_id) || preg_match("/[\|\*]/i",$this->HOT_id)){
         $message[]=_("Please specify a valid id.");
       }
-      if(!$this->is_2byteHex($this->HOT_vendor)){
+      if(empty($this->HOT_vendor) || !$this->is_2byteHex($this->HOT_vendor)){
         $message[]=_("Please specify a valid vendor id. (2 byte hex like '0xFFFF')");
       }
-      if(!$this->is_2byteHex($this->HOT_produkt)){
+      if(empty($this->HOT_produkt) || !$this->is_2byteHex($this->HOT_produkt)){
         $message[]=_("Please specify a valid product id. (2 byte hex like '0xFFFF')");
       }
       $ldap = $this->config->get_ldap_link();
index bd5d255311e14783abcd8182bbca4ca0f8b40ae1..312067824293f32575bf183c74614d1a81951500 100644 (file)
@@ -25,7 +25,7 @@
    <td style="vertical-align:top">
        <table summary="">
                 <tr>
-                        <td><LABEL for="HOT_id">{t}Serial number{/t}&nbsp;{t}(iSerial){/t}</LABEL>
+                        <td><LABEL for="HOT_id">{t}Serial number{/t}&nbsp;{t}(iSerial){/t}</LABEL>{$must}
                         </td>
                         <td>
                                 <input type="text" value="{$HOT_id}" name="HOT_id" id="HOT_id">
                         <td colspan="2">&nbsp;</td>
                 </tr>
                 <tr>
-                        <td><LABEL for="HOT_vendor">{t}Vendor-ID{/t}&nbsp;{t}(idVendor){/t}</LABEL>
+                        <td><LABEL for="HOT_vendor">{t}Vendor-ID{/t}&nbsp;{t}(idVendor){/t}</LABEL>{$must}
                         </td>
                         <td>
                                 <input type="text" value="{$HOT_vendor}" name="HOT_vendor" id="HOT_vendor">
                         </td>
                 </tr>
                 <tr>
-                        <td><LABEL for="HOT_produkt">{t}Product-ID{/t}&nbsp;{t}(idProduct){/t}</LABEL>
+                        <td><LABEL for="HOT_produkt">{t}Product-ID{/t}&nbsp;{t}(idProduct){/t}</LABEL>{$must}
                         </td>
                         <td>
                                 <input type="text" value="{$HOT_produkt}" name="HOT_produkt" id="HOT_produkt">