From 9c4edf3fa95da5383cec24e336c80b68eb1e68e6 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 28 Jan 2010 12:31:38 +0000 Subject: [PATCH] Converted FAI package selection dialog - partly... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15413 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../fai/admin/fai/class_faiPackage.inc | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc index bbfa30c33..86830bfc9 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -47,6 +47,8 @@ class faiPackage extends plugin var $base; var $FAIpackage ; + var $packageSelect ; + var $FAIinstallMethods = array( "install", "ninstall", "remove", "dselect-upgrade", "taskinst", "taskrm", "hold", "clean", "aptitude", "aptitude-r", @@ -271,14 +273,29 @@ class faiPackage extends plugin } } - /* + was pressed to open the package dialog */ - if(isset($_POST['Addpkg']) && - $this->acl_is_writeable("FAIpackage") && - !preg_match("/freeze/",$this->FAIstate)){ - $this->dialog = new faiPackageEntry($this->config, $this->FAIdebianRelease,$this->usedPackages); + // Open the packageSelect dialog to allow adding packages out of a list. + if(isset($_POST['Addpkg']) && $this->acl_is_writeable("FAIpackage") && !preg_match("/freeze/",$this->FAIstate)){ + $this->packageSelect = new packageSelect($this->config, get_userinfo()); $this->is_dialog =true; } + // Close packageSelect dialog. + if(isset($_POST['packageSelect_cancel'])){ + $this->packageSelect = FALSE; + $this->is_dialog =FALSE; + } + + // Close packageSelect dialog and add the selected packages. + if(isset($_POST['packageSelect_save'])){ + $this->packageSelect = FALSE; + $this->is_dialog =FALSE; + } + + // Display package add dialog + if($this->packageSelect instanceOf packageSelect){ + return $this->packageSelect->execute(); + } + /* Check image Posts */ -- 2.30.2