From a45c0c33f4c194ace08138e0501f0de17bf13f54 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 11 Aug 2006 04:40:20 +0000 Subject: [PATCH] Avoid multiple statement "disabled" in modify state buttons git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4473 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_plugin.inc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/class_plugin.inc b/include/class_plugin.inc index de552c67d..24863ac16 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -517,14 +517,13 @@ class plugin /* Show header message for tab dialogs */ function show_enable_header($button_text, $text, $disabled= FALSE) { - if ($disabled == TRUE){ + if (($disabled == TRUE) || (!$this->acl_is_createable())){ $state= "disabled"; } else { $state= ""; } $display= "\n

$text

\n"; - $display.= "acl_is_createable()?'':'disabled')." ".$state. + $display.= "

 

"; return($display); @@ -534,14 +533,13 @@ class plugin /* Show header message for tab dialogs */ function show_disable_header($button_text, $text, $disabled= FALSE) { - if ($disabled == TRUE){ + if (($disabled == TRUE) || !$this->acl_is_removeable()){ $state= "disabled"; } else { $state= ""; } $display= "\n

$text

\n"; - $display.= "acl_is_removeable()?'':'disabled')." ".$state. + $display.= "

 

"; return($display); -- 2.30.2