From 65b0a31aeb10e8df773e771699d89aa15d932e1a Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 13 Oct 2021 15:08:16 -0600 Subject: [PATCH] Fix expansion broken in ddddc5ba059 Caused export field checkboxes in new definition to not keep their value --- api/src/Etemplate/Widget/Grid.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/src/Etemplate/Widget/Grid.php b/api/src/Etemplate/Widget/Grid.php index 17433ba3e1..a26d76a73b 100644 --- a/api/src/Etemplate/Widget/Grid.php +++ b/api/src/Etemplate/Widget/Grid.php @@ -88,8 +88,11 @@ class Grid extends Box return false; // return } - if ($this->id && $this->type !== 'row') $cname = self::form_name($cname, $this->id, $expand); - if (!empty($expand['cname']) && $expand['cname'] !== $cname && $cname) + if($this->id && $this->type !== 'row') + { + $cname = self::form_name($cname, $this->id, $expand); + } + if($cname && (!empty($expand['cname']) && $expand['cname'] !== $cname || !$expand['cname'])) { $expand['cont'] =& self::get_array(self::$request->content, $cname); $expand['cname'] = $cname;