Code

Added classes to add new patitions
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 11 May 2011 07:45:57 +0000 (07:45 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 11 May 2011 07:45:57 +0000 (07:45 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20800 594d385d-05f5-0310-b6e9-bd551577e9d8

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

diff --git a/gosa-plugins/goto/admin/systems/goto/Device/AddPartitionDialog.tpl b/gosa-plugins/goto/admin/systems/goto/Device/AddPartitionDialog.tpl
new file mode 100644 (file)
index 0000000..8bd6648
--- /dev/null
@@ -0,0 +1 @@
+asdf
index f09ce22ea6a8e56f389852ac1814bfada405ad9e..acc2cd0aef59e3b3d70e2ebb670fa1eca5867e2f 100644 (file)
@@ -1,5 +1,9 @@
 {$list}
 
+<button name="create_partition">{msgPool type=addButton}</button>
+
+<hr>
+
 <div class="clear"></div>
 <div class="plugin-actions">
   <button type='submit' name='partition_finish'>{msgPool type=applyButton}</button>
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_AddPartitionDialog.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_AddPartitionDialog.inc
new file mode 100644 (file)
index 0000000..abfc5b5
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+
+class AddPartitionDialog
+{
+    public $partitionObject;
+
+    function __construct($config, $partitionObject)
+    {
+        $this->partitionObject = &$partitionObject;
+        $this->config = &$config;
+    }
+    
+    function execute()
+    {
+        $smarty = get_smarty();
+        
+        return(get_template_path("goto/Device/AddPartitionDialog.tpl", TRUE));
+    }
+
+    function save_object()
+    {
+    }
+
+    function save()
+    {
+    }
+}
+?>
index daf93b626d2a47f96d0ca38aae6233cd97369210..eaf11db8730e7b01e75f587a81c0b4020f4ce596 100644 (file)
@@ -7,6 +7,8 @@ class DevicePartition
     public $object =NULL;
     public $partitionString =NULL;
 
+    public $addDialog = NULL;
+
     function __construct($config, $partitionString)
     {
         $this->config = &$config;
@@ -222,6 +224,21 @@ class DevicePartition
 
     function execute()
     {
+        if(isset($_POST['create_partition'])){
+            $this->addDialog = new AddPartitionDialog($this->config, $this->object); 
+        }
+        if(isset($_POST['cancel_partition_add'])){
+            $this->addDialog = NULL;
+        }
+        if(isset($_POST['save_partition_add'])){
+            $this->addDialog = NULL;
+        }
+        if($this->addDialog){
+            $this->addDialog->save_object();
+            return($this->addDialog->execute());
+        }
+
+
         $this->init();