From: hickert Date: Mon, 18 Jan 2010 10:50:06 +0000 (+0000) Subject: Updated baseSelectDialog X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3cb613898f26460af95953bc5c0bd5dc285c0c5e;p=gosa.git Updated baseSelectDialog -Added cancel button git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15167 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_baseSelectDialog.inc b/gosa-core/include/class_baseSelectDialog.inc index c3b09b6f3..e8373d9b5 100644 --- a/gosa-core/include/class_baseSelectDialog.inc +++ b/gosa-core/include/class_baseSelectDialog.inc @@ -33,6 +33,7 @@ class baseSelectDialog extends management // #FIXME - Updated plugins to use a function instead of the public class var. public $BaseToUse = ""; + public $dialogClose = FALSE; function __construct (&$config,$parent,$onlyAllowThisBases = array()) { @@ -53,6 +54,7 @@ class baseSelectDialog extends management $headpage->registerElementFilter("depLabel", "baseSelectDialog::filterDepLabel"); $headpage->setFilter($filter); $this->registerAction("open","openEntry"); + $this->registerAction("cancelBaseSelect","cancelBaseSelect"); parent::__construct($config, $this->ui, "departments", $headpage); } @@ -64,6 +66,16 @@ class baseSelectDialog extends management $headpage->setBase(array_pop($entry)); } + function execute() + { + $str = management::execute(); + $str.= "

 

+

+ +

"; + return($str); + } + // A filter which allows to open a department by clicking on the departments name. static function filterDepLabel($row,$dn,$params,$ou,$pid,$base) @@ -95,7 +107,7 @@ class baseSelectDialog extends management function isClosed() { - return(FALSE); + return($this->dialogClose); } function isSelected() @@ -108,6 +120,18 @@ class baseSelectDialog extends management $headpage = $this->getHeadpage(); $headpage->setBase = $base; } + + function cancelBaseSelect() + { + $this->dialogClose = TRUE; + } + + function detectPostActions() + { + $action = management::detectPostActions(); + if(isset($_POST['cancelBaseSelect'])) $action['action'] = "cancelBaseSelect"; + return($action); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>