Code

Fixed submit button handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Jul 2006 06:50:58 +0000 (06:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Jul 2006 06:50:58 +0000 (06:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4219 594d385d-05f5-0310-b6e9-bd551577e9d8

include/smarty/plugins/block.render.php

index daceb8e7bffd9b1c38cfe90214c458deab662e97..0b764c2800c08adde8a12676e284a6afe02cfd38 100755 (executable)
@@ -16,15 +16,20 @@ function smarty_block_render($params, $text, &$smarty)
                unset($params['acl']);
        }
 
+       echo "<font color='blue' size='2'>".$acl."</font>";
+
        /* Read / Write*/
        if(preg_match("/w/i",$acl)){
                return ($text);
        }
 
-       $from   =  array("/name=/i");
-       $to     =  array("disabled name=");
-       $text = preg_replace($from,$to,$text);
-               
+       /* Disable objects, but keep submit buttons active in readmode */
+       if(!preg_match("/submit/",$text)){
+               $from   =  array("/name=/i");
+               $to     =  array("disabled name=");
+               $text = preg_replace($from,$to,$text);
+       }               
+
        /* Read only */
        if(preg_match("/r/i",$acl)){
                return($text);