From 7375768e251127c69baf9e01c9d971b4890ee8a4 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 2 Aug 2022 16:45:01 -0600 Subject: [PATCH] Fix tabs=>extraTabs did not validate properly --- api/src/Etemplate/Widget/Tabbox.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/api/src/Etemplate/Widget/Tabbox.php b/api/src/Etemplate/Widget/Tabbox.php index 26a8ad20e8..d108bdd0a1 100644 --- a/api/src/Etemplate/Widget/Tabbox.php +++ b/api/src/Etemplate/Widget/Tabbox.php @@ -47,9 +47,14 @@ class Tabbox extends Etemplate\Widget $form_name = self::form_name($params[0], $this->id, $params[1]); // Make sure additional tabs are processed for any method - if (!($tabs =& self::getElementAttribute($form_name, 'tabs'))) + if($tabs = self::getElementAttribute($form_name, 'tabs')) { - $tabs = $this->attrs['tabs']; + // tabs is not usable in webComponent, need to use extraTabs + self::setElementAttribute($form_name, 'extraTabs', $tabs); + } + if(!($tabs =& self::getElementAttribute($form_name, 'extraTabs'))) + { + $tabs = $this->attrs['extraTabs']; } if($tabs && !$this->tabs_attr_evaluated) { @@ -73,7 +78,7 @@ class Tabbox extends Etemplate\Widget } unset($tab); //error_log(__METHOD__."('$method_name', ...) this->id='$this->id' calling setElementAttribute('$form_name', 'tabs', ".array2string($tabs).")"); - self::setElementAttribute($form_name, 'tabs', $tabs); + self::setElementAttribute($form_name, 'extraTabs', $tabs); } // Check for disabled tabs set via readonly, and set them as disabled