Code

Updated gotomasses plugin
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 Apr 2007 13:02:59 +0000 (13:02 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 Apr 2007 13:02:59 +0000 (13:02 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6056 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/addons/gotomasses/class_gotomasses.inc
plugins/addons/gotomasses/contents.tpl

index 108022afb0baafcc15c38200a29151d38423db3f..cc5527e6c72b9a88e59241d0ff0c651253ac3599 100644 (file)
@@ -69,16 +69,16 @@ class gotomasses extends plugin
     if(isset($_POST['import_gotomass_csv']) && isset($_FILES['mass_file'])){
       $str = @file_get_contents($_FILES['mass_file']['tmp_name']);
       if(empty($str)){
-        print_red(_("Uploaded file seams to be empty, import aborted."));
+        print_red(_("The uploaded file seams to be empty, import aborted."));
       }else{
         $this->load_csv_data($str);
       }
     }
+
+    /* Add a new empty entry to the list */ 
     if(isset($_POST['add_new_entry'])){
       $this->contents[] = array("MAC" => "", "OG" => "");
     }
 
     /* Call parent execute */
     plugin::execute();
@@ -92,7 +92,6 @@ class gotomasses extends plugin
 
   function load_csv_data($data = NULL)
   {
-
     if($data == NULL){
       if(!file_exists($this->file_to_read) || !is_readable($this->file_to_read)){
         print_red(sprintf(_("Can't locate or read goto masses csv storage file '%s'."),$this->file_to_read));
@@ -209,7 +208,7 @@ class gotomasses extends plugin
         "plDepends"     => array(),
         "plPriority"    => 0,
         "plSection"     => array("addon"),
-        "plCategory"    => array("mass_machines" => array("objectClass" => "none", "description" => _("Mass machine deployment"))),
+        "plCategory"    => array("gotomasses" => array("objectClass" => "none", "description" => _("Mass machine deployment"))),
         "plProvidedAcls" => array()
         ));
   }
index ac756ee785275c6d5bdfc12bb19af50fe60a903a..ef8afc478e46465a251867d3935fcfa7a2670561 100644 (file)
@@ -8,12 +8,19 @@
        <table summary="" width="100%" class="contentboxb" style="border-top:1px solid #B0B0B0; padding:0px;">
                <tr>
                        <td>
-       <input type='submit' name='export_gotomass_csv' value='{t}Export{/t}'>
-       <input type='file' name='mass_file'>
+                               {t}Export{/t}&nbsp;
+                               <input type='submit' name='export_gotomass_csv' value='{t}Export{/t}'>
+                       </td>
+                       <td style='width:20px;'>
+                       </td>
+                       <td>
+                               {t}Import{/t}&nbsp;
+                       
+                               <input type='file' name='mass_file'>
 
-       <input type='submit' name='import_gotomass_csv' value='{t}Import{/t}'>
-       </td>
-       </tr>
+                               <input type='submit' name='import_gotomass_csv' value='{t}Import{/t}'>
+                       </td>
+               </tr>
        </table>
 </div>
        <table summary="" width="100%" class="contentboxb">