From: hickert Date: Fri, 11 Aug 2006 04:40:20 +0000 (+0000) Subject: Avoid multiple statement "disabled" in modify state buttons X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a45c0c33f4c194ace08138e0501f0de17bf13f54;p=gosa.git Avoid multiple statement "disabled" in modify state buttons git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4473 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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);