Code

Updated partition table editing
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 10 May 2011 13:53:39 +0000 (13:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 10 May 2011 13:53:39 +0000 (13:53 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20799 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/Device/DevicePartition.tpl [new file with mode: 0644]
gosa-plugins/goto/admin/systems/goto/Device/class_DevicePartition.inc
gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc

diff --git a/gosa-plugins/goto/admin/systems/goto/Device/DevicePartition.tpl b/gosa-plugins/goto/admin/systems/goto/Device/DevicePartition.tpl
new file mode 100644 (file)
index 0000000..f09ce22
--- /dev/null
@@ -0,0 +1,8 @@
+{$list}
+
+<div class="clear"></div>
+<div class="plugin-actions">
+  <button type='submit' name='partition_finish'>{msgPool type=applyButton}</button>
+  <button type='submit' name='partition_cancel'>{msgPool type=cancelButton}</button>
+</div>
+
index 737bd02ea6870222fa7cb4403e62e8141566347c..daf93b626d2a47f96d0ca38aae6233cd97369210 100644 (file)
@@ -223,7 +223,12 @@ class DevicePartition
     function execute()
     {
         $this->init();
-        return($this->entryList->render());
+
+
+        $smarty = get_smarty();
+        $smarty->assign('list', $this->entryList->render());
+
+        return($smarty->fetch(get_template_path('goto/Device/DevicePartition.tpl', TRUE)));
     }
 
     function save_object()
@@ -231,6 +236,11 @@ class DevicePartition
 
     }
 
+    function save()
+    {
+        return("");
+    }
+
     function __convertPartSize($size)
     {
         return($size." MB");
index 1bef6aadac5f0e456e5a9ab5ea8c0527fce1244e..f1383a2182d248d3de44d3157575cb946089b5d0 100644 (file)
@@ -331,11 +331,20 @@ class InstallRecipe extends plugin
             return($smarty->fetch(get_template_path('goto/Device/SetPassword.tpl', TRUE)));
         }
 
-    
+        /***************
+          Partition dialog
+         ***************/
+
+        if(isset($_POST['partition_finish']) && $this->partitionEdit){
+            $this->installPartitionTable = $this->partitionEdit->save();
+            $this->partitionEdit = NULL;
+        }
+        if(isset($_POST['partition_cancel']) && $this->partitionEdit){
+            $this->partitionEdit = NULL;
+        }
         if(isset($_POST['edit_installPartitionTable'])){
             $this->partitionEdit = new DevicePartition($this->config, $this->installPartitionTable);
         }
-    
         if($this->partitionEdit){
             $this->partitionEdit->save_object();
             $this->dialog = TRUE;