From dd30ac28f48218d97d33d3f2aa8064899014b789 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 10 Feb 2015 00:13:31 +0000 Subject: [PATCH] - Allow app attribute to be specified in the template file, not just at run-time - Use app attribute to fix infolog customfields in addressbook CRM view --- ...lass.etemplate_widget_customfields.inc.php | 20 +++++++++++++------ infolog/templates/default/index.xet | 4 ++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/etemplate/inc/class.etemplate_widget_customfields.inc.php b/etemplate/inc/class.etemplate_widget_customfields.inc.php index 68e637cf79..5897dd8840 100644 --- a/etemplate/inc/class.etemplate_widget_customfields.inc.php +++ b/etemplate/inc/class.etemplate_widget_customfields.inc.php @@ -90,14 +90,22 @@ class etemplate_widget_customfields extends etemplate_widget_transformer $form_name = self::form_name($cname, $this->id, $expand); // Store properties at top level, so all customfield widgets can share - $app =& $this->getElementAttribute(self::GLOBAL_VALS, 'app'); - if($this->getElementAttribute($form_name, 'app')) + if($this->attrs['app']) { - $app =& $this->getElementAttribute($form_name, 'app'); - } else + $app = $this->attrs['app']; + } + else { - // Checking creates it even if it wasn't there - unset(self::$request->modifications[$form_name]['app']); + $app =& $this->getElementAttribute(self::GLOBAL_VALS, 'app'); + if($this->getElementAttribute($form_name, 'app')) + { + $app =& $this->getElementAttribute($form_name, 'app'); + } + else + { + // Checking creates it even if it wasn't there + unset(self::$request->modifications[$form_name]['app']); + } } if($this->getElementAttribute($form_name, 'customfields')) diff --git a/infolog/templates/default/index.xet b/infolog/templates/default/index.xet index 3f3626b60c..1feeb3f49e 100644 --- a/infolog/templates/default/index.xet +++ b/infolog/templates/default/index.xet @@ -55,7 +55,7 @@ - + @@ -95,7 +95,7 @@ - +