Code

Prevent multiple categories of the same type in userFilterEditor
[gosa.git] / gosa-core / include / class_plugin.inc
index eb21b5e0fcf40886bd6c9e00371efec0e9af8a87..d0c7b8096bfd31744201bd048e780cee134e1764 100644 (file)
  */
 
 class plugin
-{
+{ 
+  /*! \brief    The title shown in path menu while this plugin is visible.
+   */
+  var $pathTitle = "";
+
   /*!
     \brief Reference to parent object
 
@@ -276,6 +280,8 @@ class plugin
     session::set('LOCK_VARS_USED_GET',array());
     session::set('LOCK_VARS_USED_POST',array());
     session::set('LOCK_VARS_USED_REQUEST',array());
+
+    pathNavigator::registerPlugin($this);
   }
 
   /*! \brief Removes object from parent
@@ -588,9 +594,10 @@ class plugin
     } else {
       $state= "";
     }
-    $display= "<table summary=\"\" width=\"100%\"><tr>\n<td colspan=2><p><b>$text</b></p>\n";
-    $display.= "<input type=submit value=\"$button_text\" name=\"modify_state\" ".$state.
-      "><p class=\"seperator\">&nbsp;</p></td></tr></table>";
+    $display = "<div class='plugin-enable-header'>\n";
+    $display.= "<p>$text</p>\n";
+    $display.= "<button type='submit' name=\"modify_state\" ".$state.">$button_text</button>\n";
+    $display.= "</div>\n";
 
     return($display);
   }
@@ -604,31 +611,14 @@ class plugin
     } else {
       $state= "";
     }
-    $display= "<table summary=\"\" width=\"100%\"><tr>\n<td colspan=2><p><b>$text</b></p>\n";
-    $display.= "<input type=submit value=\"$button_text\" name=\"modify_state\" ".$state.
-      "><p class=\"seperator\">&nbsp;</p></td></tr></table>";
-
+    $display = "<div class='plugin-disable-header'>\n";
+    $display.= "<p>$text</p>\n";
+    $display.= "<button type='submit' name=\"modify_state\" ".$state.">$button_text</button>\n";
+    $display.= "</div>\n";
     return($display);
   }
 
 
-  /*! \brief Show header message for tab dialogs */
-  function show_header($button_text, $text, $disabled= FALSE)
-  {
-    echo "FIXME: show_header should be replaced by show_disable_header and show_enable_header<br>";
-    if ($disabled == TRUE){
-      $state= "disabled";
-    } else {
-      $state= "";
-    }
-    $display= "<table summary=\"\" width=\"100%\"><tr>\n<td colspan=2><p><b>$text</b></p>\n";
-    $display.= "<input type=submit value=\"$button_text\" name=\"modify_state\" ".
-      ($this->acl_is_createable()?'':'disabled')." ".$state.
-      "><p class=\"seperator\">&nbsp;</p></td></tr></table>";
-
-    return($display);
-  }
-
 
   /* Create unique DN */
   function create_unique_dn2($data, $base)
@@ -1998,8 +1988,8 @@ class plugin
   }
 
 
-  /*! \brief    Forward command execution request
-   *             to the correct method. 
+  /*! \brief    Forward command execution requests
+   *             to the hook execution method. 
    */
   function handle_post_events($mode, $addAttrs= array())
   {