From 9970f958843e093544a005e8b950a872668ff2bd Mon Sep 17 00:00:00 2001 From: earnolmartin Date: Thu, 13 Jul 2023 11:22:06 -0600 Subject: [PATCH] Enable Tabs in Templates When Editing in Panel --- ehcp/classapp.php | 4 +++- ehcp/templates/all_templates/scripts/ehcp.js | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ehcp/classapp.php b/ehcp/classapp.php index 1d0db1c..3f7e0c8 100755 --- a/ehcp/classapp.php +++ b/ehcp/classapp.php @@ -1607,7 +1607,7 @@ function editApacheTemplate(){ array('clearTemplate','submit','default'=>'Revert to Default'), array('op','hidden','default'=>__FUNCTION__) ); - $this->output.= '

' . $this->selecteddomain . ' Using Default Template: ' . ($usingDefault ? 'YES' : 'NO') . '

' . inputform5($inputparams); + $this->output.= '

' . $this->selecteddomain . ' Using Default Template: ' . ($usingDefault ? 'YES' : 'NO') . '

' . inputform5($inputparams) . '
'; }else { if($clearTemplate){ $success=$success && $this->executeQuery("update ".$this->conf['domainstable']['tablename']." set $templatefield='' where domainname='" . $domainname . "'"); @@ -1787,7 +1787,9 @@ function editDnsTemplate(){ array('op','hidden','default'=>__FUNCTION__) ); + $this->output.= '
'; $this->output.=inputform5($inputparams); + $this->output.= '
'; } else { if($dnstemplate==$this->escape($templateinfile)) { diff --git a/ehcp/templates/all_templates/scripts/ehcp.js b/ehcp/templates/all_templates/scripts/ehcp.js index d5e7d17..4b99046 100755 --- a/ehcp/templates/all_templates/scripts/ehcp.js +++ b/ehcp/templates/all_templates/scripts/ehcp.js @@ -11,6 +11,8 @@ $(document).ready(function() { getPublicServerSettings(); handleExpanders(); handleShowAdvancedAdminOptions(); + + enableTabAreasForCertainTextAreas(); }); function getGlobalTemplateFile(template, webserverMode, webserverType){ @@ -142,3 +144,20 @@ function handleShowAdvancedAdminOptions(){ } }); } + +function enableTabAreasForCertainTextAreas(){ + var textareas = document.getElementsByTagName('textarea'); + var count = textareas.length; + for(var i=0;i