From 0a1c0e5135d3255cd57689dd0cfcbc0978241c96 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 9 Jun 2014 19:24:48 +0000 Subject: [PATCH] Do disabled check before grid name expansion, so disabled=!@grid_id will work --- etemplate/inc/class.etemplate_widget_grid.inc.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/etemplate/inc/class.etemplate_widget_grid.inc.php b/etemplate/inc/class.etemplate_widget_grid.inc.php index 4aea1ad0d2..4fb2736c78 100644 --- a/etemplate/inc/class.etemplate_widget_grid.inc.php +++ b/etemplate/inc/class.etemplate_widget_grid.inc.php @@ -68,12 +68,7 @@ class etemplate_widget_grid extends etemplate_widget_box $expand =& $params[1]; $old_cname = $params[0]; $old_expand = $params[1]; - if ($this->id) $cname = self::form_name($cname, $this->id, $expand); - if ($expand['cname'] !== $cname && $cname) - { - $expand['cont'] =& self::get_array(self::$request->content, $cname); - $expand['cname'] = $cname; - } + // as a grid can contain other grid's as direct child, we have to backup and initialise $columns_disabled if ($this->type == 'grid') { @@ -88,6 +83,14 @@ class etemplate_widget_grid extends etemplate_widget_box $params[1] = $old_expand; return false; // return } + + if ($this->id) $cname = self::form_name($cname, $this->id, $expand); + if ($expand['cname'] !== $cname && $cname) + { + $expand['cont'] =& self::get_array(self::$request->content, $cname); + $expand['cname'] = $cname; + } + if (method_exists($this, $method_name)) { call_user_func_array(array($this, $method_name), $params);