allow to use namespaced $readonlys for grids, eg. grid uses "grid" as name, you can now set $readonlys["grid"]["something"] as well as $readonlys["something"] like in eTemplate2

This commit is contained in:
Ralf Becker 2014-03-14 09:36:01 +00:00
parent 617928f00b
commit 184a9fa4e8

View File

@ -1526,7 +1526,7 @@ class etemplate_old extends boetemplate
{ {
$cname .= $cname == '' ? $name : '['.str_replace('[','][',str_replace(']','',$name)).']'; $cname .= $cname == '' ? $name : '['.str_replace('[','][',str_replace(']','',$name)).']';
} }
$html .= $this->show_grid($cell,$name ? $value : $content,$readonlys,$cname,$show_c,$show_row,$path); $html .= $this->show_grid($cell,$name ? $value : $content,$readonlys+(array)$readonlys[$name],$cname,$show_c,$show_row,$path);
if ($set_readonlys_all) unset($readonlys['__ALL__']); if ($set_readonlys_all) unset($readonlys['__ALL__']);
break; break;
case 'template': // size: index in content-array (if not full content is past further on) case 'template': // size: index in content-array (if not full content is past further on)