From bf1bd631101d48ba9472552d7412d00ed10f85f2 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 19 Apr 2017 10:43:42 -0600 Subject: [PATCH] If tab is hidden, set widgets to readonly to avoid the need for client side validation --- api/js/etemplate/et2_widget_tabs.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/js/etemplate/et2_widget_tabs.js b/api/js/etemplate/et2_widget_tabs.js index 8086ecec84..f7bb2e08d9 100644 --- a/api/js/etemplate/et2_widget_tabs.js +++ b/api/js/etemplate/et2_widget_tabs.js @@ -280,6 +280,11 @@ var et2_tabbox = (function(){ "use strict"; return et2_valueWidget.extend([et2_I if(!tabData || tabData.loaded) return; if(tabData.XMLNode != null) { + if(tabData.hidden) + { + // Set hidden tab to readonly, so widgets aren't active + tabData.XMLNode.setAttribute('readonly', true); + } tabData.widget = this.createElementFromNode(tabData.XMLNode,tabData.XMLNode.nodeName.toLowerCase()); // Release the XML node