From 60777bf3e367c3e1cf335c7e93167c5c62e38545 Mon Sep 17 00:00:00 2001 From: stevenA Date: Wed, 19 Jan 2022 13:46:47 +0100 Subject: [PATCH] Fix saving of custom soft keysets Red border if invalid set name Clean up modal indenting Define valid chars Only initialise general section at each save (previously initialised all clearing soft key sets) --- module.xml | 2 +- sccpManTraits/helperFunctions.php | 5 +- views/advserver.keyset.php | 89 ++++++++++++++++--------------- 3 files changed, 50 insertions(+), 46 deletions(-) diff --git a/module.xml b/module.xml index de1728c..8b511d0 100644 --- a/module.xml +++ b/module.xml @@ -1,7 +1,7 @@ sccp_manager SCCP Manager - 14.4.0.5 + 14.4.0.6 setup SCCP Connectivity Steve Lad, Alex GP diff --git a/sccpManTraits/helperFunctions.php b/sccpManTraits/helperFunctions.php index 6872f35..a6e4c3a 100644 --- a/sccpManTraits/helperFunctions.php +++ b/sccpManTraits/helperFunctions.php @@ -280,8 +280,8 @@ trait helperfunctions { // [general] section // TODO: Need to review sccpsettings seq numbering, as will speed this up, and remove the need for $permittedSettings. $cnf_wr = \FreePBX::WriteConfig(); - //clear old settings, and initiate with allow/disallow and permit/deny keys in correct order - $this->sccp_conf_init = array(); + //clear old general settings, and initiate with allow/disallow and permit/deny keys in correct order + $this->sccp_conf_init['general'] = array(); $this->sccp_conf_init['general']['disallow'] = 'all'; $this->sccp_conf_init['general']['allow'] = ''; $this->sccp_conf_init['general']['deny'] = '0.0.0.0/0.0.0.0'; @@ -352,7 +352,6 @@ trait helperfunctions { ); } $cnf_wr->WriteConfig('sccp.conf', $this->sccp_conf_init); - //$this->$cnf_wr->writeConfig('sccp.conf', $this->sccp_conf_init); } public function initVarfromXml() { diff --git a/views/advserver.keyset.php b/views/advserver.keyset.php index 6d610d7..ded3f30 100644 --- a/views/advserver.keyset.php +++ b/views/advserver.keyset.php @@ -46,39 +46,37 @@ $keynamearray = array('onhook' => array('sname' => 'ONHOOK', 'name' =>'Displa
- -
-
-
-
-
- -
- - - - - - $value) { - if ($i < 9) { - echo ''; - } - $i ++; +
+
+
+
+
+ +
+
'._($value['sname']).'
+ + + + $value) { + if ($i < 12) { + echo ''; } - ?> - - - - + $i ++; + } + ?> + + + + - -
'._($value['sname']).'
+ + +
-
@@ -90,18 +88,27 @@ $keynamearray = array('onhook' => array('sname' => 'ONHOOK', 'name' =>'Displa - -