Commit 892cd318 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #946 Moved dialog to simplePlugin and plNotify to simpleTabs

parent 332fed5a
......@@ -43,14 +43,9 @@ class plugin
public $initially_was_account = FALSE;
public $ignore_account = FALSE;
var $dialog = FALSE;
var $acl_base = "";
var $acl_category = "";
/*! \brief Can be set to render the tabulators in another stylesheet */
public $pl_notify = FALSE;
/*!
* \brief Rename/Move a given src_dn to the given dest_dn
*
......
......@@ -87,6 +87,8 @@ class simplePlugin extends plugin
protected $templatePath;
protected $dialog = FALSE;
/*! \brief Are we executed in a edit-mode environment? (this is FALSE if we're called from management, TRUE if we're called from a main.inc)
*/
protected $needEditMode = FALSE;
......
......@@ -35,6 +35,7 @@ class simpleTabs
public $objectType = FALSE;
protected $specialTabs = TRUE;
protected $plNotify = array();
var $last = "";
var $current = "";
......@@ -265,7 +266,7 @@ class simpleTabs
/* Take care about notifications */
$obj = $this->by_object[$class];
if ($this->by_object[$class]->pl_notify && ($obj->is_account || $obj->ignore_account)) {
if ($this->plNotify[$class] && ($obj->is_account || $obj->ignore_account)) {
$cssClasses .= ' tab-notify';
}
if ($disabled) {
......@@ -335,23 +336,20 @@ class simpleTabs
/* Check all plugins */
foreach ($this->by_object as $key => $obj) {
$this->plNotify[$key] = FALSE;
if (($obj->is_account || $obj->ignore_account) && (!$obj->is_template)) {
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $key, "Checking");
$msg = $obj->check();
if (count($msg)) {
$obj->pl_notify = TRUE;
$this->plNotify[$key] = TRUE;
if (!$current_set) {
$current_set = TRUE;
$this->current = $key;
$messages = $msg;
}
} else {
$obj->pl_notify = FALSE;
}
} else {
$obj->pl_notify = FALSE;
}
}
......
......@@ -238,7 +238,7 @@ class setup
/* Skip adding forward/backward button,
* if the currently opened step is a sub dialog
*/
if ($this->o_steps[$this->i_current]->dialog) {
if ($this->o_steps[$this->i_current]->is_modal_dialog()) {
$str = '';
} else {
$str = ' <p class="plugbottom">';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment