diff --git a/sccpManTraits/bmoFunctions.php b/sccpManTraits/bmoFunctions.php index 9d54576..9bbd35e 100644 --- a/sccpManTraits/bmoFunctions.php +++ b/sccpManTraits/bmoFunctions.php @@ -3,12 +3,41 @@ namespace FreePBX\modules\Sccp_manager\sccpManTraits; trait bmoFunctions { - /* unused but FPBX API requires it */ + + //Need to reload freePBX for modifications below to work + + //need to catch extensions + public static function myConfigPageInits() { + dbug('have config page inits'); + return array("extensions"); + } public function doConfigPageInit($page) { + if ($page == "extensions") { + dbug('have extensions in doConfigPageInit'); + } $this->doGeneralPost(); } + // Try to change extensions which is part of core + public static function myGuiHooks() { + return array('core'); + } + + public function doGuiHook(&$cc) { + dbug('$_REQUEST', $_REQUEST); + //dbug('CC', $cc); + if ($_REQUEST['display'] == "extensions" ) { + if (isset($_REQUEST['tech_hardware'])) { + dbug('Have caught hook in doGuiHook'); + $this->getActionBar($_REQUEST); + } + //$cc->addguielem("_top", new \gui_pageheading('', 'I added a header', false)); + } + } + + + /* unused but FPBX API requires it */ public function install() { @@ -85,7 +114,6 @@ trait bmoFunctions { 'value' => _("Cancel") ), ); - break; case 'sccpsettings': $buttons = array( @@ -101,7 +129,30 @@ trait bmoFunctions { 'value' => _("Cancel") ), ); - + break; + case 'extensions': + // only called from configpage inits + $buttons = array( + 'submit' => array( + 'name' => 'ajaxsubmit', + 'id' => 'ajaxsubmit', + 'data-search' => '?display=sccp_custom', + 'value' => _("Save") + ), + 'Save' => array( + 'name' => 'ajaxsubmit2', + 'id' => 'ajaxsubmit2', + 'stayonpage' => 'yes', + 'value' => _("Save + Continue") + ), + 'cancel' => array( + 'name' => 'cancel', + 'id' => 'ajaxcancel', + 'data-search' => '?display=sccp_custom', + 'data-hash' => 'sccpdevice', + 'value' => _("Cancel") + ), + ); break; } return $buttons; diff --git a/views/advserver.dialtemplate.php b/views/advserver.dialtemplate.php index cc37ab7..e7bd7bf 100644 --- a/views/advserver.dialtemplate.php +++ b/views/advserver.dialtemplate.php @@ -12,12 +12,12 @@

-   +  
- +
@@ -39,4 +39,4 @@ } return exp_model; } - \ No newline at end of file + diff --git a/views/advserver.keyset.php b/views/advserver.keyset.php index 2dc039c..6228047 100644 --- a/views/advserver.keyset.php +++ b/views/advserver.keyset.php @@ -54,7 +54,7 @@ $keynamearray = array('onhook' => array('sname' => 'ONHOOK', 'name' =>'Displa
-
+
@@ -72,7 +72,7 @@ $keynamearray = array('onhook' => array('sname' => 'ONHOOK', 'name' =>'Displa - +
@@ -101,9 +101,9 @@ $keynamearray = array('onhook' => array('sname' => 'ONHOOK', 'name' =>'Displa Help. max len = 15 - +