Code

Added release selector
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 Mar 2010 12:38:20 +0000 (12:38 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 Mar 2010 12:38:20 +0000 (12:38 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17348 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_faiManagement.inc

index 60e775401cda7520812c6cdd39d2a3a16a2c4983..1bc9583c9321f7226a373b1e29416b6d2cf89598 100644 (file)
@@ -32,6 +32,7 @@ class faiManagement extends management
   protected $aclCategory = "";
   protected $aclPlugin   = "";
   protected $objectName   = "FAI object";
+  protected $releaseSelector = NULL;
 
   //  Attributes Managed by this plugin can be used in post events
   public $attributes   = array("lock_type","lock_name","lock_dn");  
@@ -85,7 +86,7 @@ class faiManagement extends management
         get_ou('faiTemplateRDN'));
 
     // Build filter
-    if (session::global_is_set(get_class($this)."_filter")){
+    if (0 && session::global_is_set(get_class($this)."_filter")){
       $filter= session::global_get(get_class($this)."_filter");
     } else {
       $filter = new filter(get_template_path("fai-filter.xml", true));
@@ -123,6 +124,7 @@ class faiManagement extends management
     $this->registerAction("saveBranch","saveBranch");
     $this->registerAction("PerformBranch","PerformBranch");
 
+    $this->releaseSelector = new releaseSelector($releases, $this->fai_release, $this->fai_release);
     parent::__construct($config, $ui, "FAI object", $headpage);
   }
 
@@ -1071,21 +1073,15 @@ class faiManagement extends management
   {
     $filter = $this->getFilter();
     $headpage = $this->getHeadpage();
-    $filter->setComboBoxOptions("RELEASE",$this->getReleaseList());
-
-    if(isset($_POST['RELEASE'])){
-      $this->fai_release = get_post('RELEASE');
-    }
-    $headpage->setBase($this->fai_release);
+    $this->releaseSelector->update();
+    $headpage->setBase($this->releaseSelector->getBase());
     $headpage->update();
     $smarty = get_smarty();
-    $smarty->assign("fai_release", $this->fai_release);
-    $smarty->assign("opsi_available", (is_object($this->opsi) && $this->opsi->enabled()));
-    $smarty->assign("fai_base", $this->fai_base);
     $r = $this->config->search("faiManagement", "POSTREMOVE",array('menu','tabs'));
     $c = $this->config->search("faiManagement", "POSTCREATE",array('menu','tabs'));
     $smarty->assign("allow_create", $c);
     $smarty->assign("allow_remove", $r);
+    $smarty->assign("RELEASE", $this->releaseSelector->render());
     $display = $headpage->render();
     return($this->getHeader().$display);
   }