From: hickert Date: Wed, 19 Jul 2006 07:04:24 +0000 (+0000) Subject: Added read active mode, to force some objects to be enabled in readmode X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d1f3ba8c89d29fd72ac502ac2ceb32b74caa7436;p=gosa.git Added read active mode, to force some objects to be enabled in readmode git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4221 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/smarty/plugins/block.render.php b/include/smarty/plugins/block.render.php index 0b764c280..e201ba7fb 100755 --- a/include/smarty/plugins/block.render.php +++ b/include/smarty/plugins/block.render.php @@ -16,15 +16,15 @@ function smarty_block_render($params, $text, &$smarty) unset($params['acl']); } - echo "".$acl.""; +// echo "".$acl.""; /* Read / Write*/ if(preg_match("/w/i",$acl)){ return ($text); } - /* Disable objects, but keep submit buttons active in readmode */ - if(!preg_match("/submit/",$text)){ + /* Disable objects, but keep those active that have mode=read_active */ + if(!(isset($params['mode']) && $params['mode']=='read_active')){ $from = array("/name=/i"); $to = array("disabled name="); $text = preg_replace($from,$to,$text); diff --git a/plugins/personal/generic/generic.tpl b/plugins/personal/generic/generic.tpl index a1f4b9e63..28bd19a68 100644 --- a/plugins/personal/generic/generic.tpl +++ b/plugins/personal/generic/generic.tpl @@ -203,7 +203,7 @@ - {render acl=$CertificatesACL} + {render acl=$CertificatesACL mode=read_active} {/render}