Code

Added support for comments in divlist
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 31 May 2006 10:36:00 +0000 (10:36 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 31 May 2006 10:36:00 +0000 (10:36 +0000)
Updated printer settings to have labeledURI as a must field

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3580 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_divListSystem.inc
plugins/admin/systems/class_printGeneric.inc
plugins/admin/systems/printer.tpl

index d36f76051690f5e02f96a237db96267a150519a9..b58169262f276e3faa9c0676a3cad729f78edfcb 100644 (file)
@@ -159,10 +159,14 @@ class divListSystem extends MultiSelectWindow
       $val['cn'][0]= preg_replace('/\$$/', '', $val['cn'][0]);
 
       // Generate Array to Add
+      $dsc= "";
+      if (isset($val['description'][0])){
+        $dsc= " [".$val['description'][0]."]";
+      }
       if((isset($val['is_new']))&&(!empty($val['is_new']))){
-        $display= "".$val["cn"][0]." ".$val['is_new'];
+        $display= $val["cn"][0]." ".$val['is_new'].$dsc;
       }else{
-        $display= "".$val["cn"][0]."";
+        $display= $val["cn"][0].$dsc;
       }
 
       if((in_array("gotoTerminal",$val['objectClass']))||(in_array("gotoWorkstation",$val['objectClass']))){
index b5fc453416b91f881ee89b2c8960bb481ed5a122..7c51299fe51f3e6c49e77dbf020cce1e3f62d089 100644 (file)
@@ -602,6 +602,11 @@ class printgeneric extends plugin
       $message[]= "The required field 'Printer name' is not set.";
     }
     
+    /* must: labeledURI */
+    if(empty($this->labeledURI)){
+      $message[]= "The required field 'Printer URL' is not set.";
+    }
+    
     /* Check if there is already an entry with this cn*/
     if (($this->orig_dn != $dn)&&($this->BelongsTo == "Printer")){
       $ldap= $this->config->get_ldap_link();
index a7582b45dd2b29e5aad90ce32e5d4fec2e83c700..808d47f746ec152bcba1a89ff87a20c226810a48 100644 (file)
@@ -40,7 +40,7 @@
                                        <td><input id="l" name="l" size=25 maxlength=80 value="{$l}"></td>
                                </tr>
                                <tr>
-                                       <td><LABEL for="labeledURI">{t}Printer URL{/t}</LABEL></td>
+                                       <td><LABEL for="labeledURI">{t}Printer URL{/t}</LABEL>{$must}</td>
                                        <td><input id="labeledURI" name="labeledURI" size=25 maxlength=80 value="{$labeledURI}"></td>
                                </tr>
                        </table>