Code

Added read active mode, to force some objects to be enabled in readmode
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Jul 2006 07:04:24 +0000 (07:04 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Jul 2006 07:04:24 +0000 (07:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4221 594d385d-05f5-0310-b6e9-bd551577e9d8

include/smarty/plugins/block.render.php
plugins/personal/generic/generic.tpl

index 0b764c2800c08adde8a12676e284a6afe02cfd38..e201ba7fb863be83b8f114790b86387b4662ae56 100755 (executable)
@@ -16,15 +16,15 @@ function smarty_block_render($params, $text, &$smarty)
                unset($params['acl']);
        }
 
-       echo "<font color='blue' size='2'>".$acl."</font>";
+//     echo "<font color='blue' size='2'>".$acl."</font>";
 
        /* 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);
index a1f4b9e6381e55d72fff14cd6e48f772484030fa..28bd19a6891da6c5e3cef3a3215f46eb7de8da0d 100644 (file)
     <tr>
      <td><label for="edit_cert">{t}Certificates{/t}</label></td>
      <td>
-       {render acl=$CertificatesACL}
+       {render acl=$CertificatesACL mode=read_active}
                <input id="edit_cert" type="submit" name="edit_cert" value="{t}Edit certificates{/t}...">
        {/render}
      </td>