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
-
+
-
+
$value) {
@@ -129,7 +129,7 @@ foreach ($keysetarray as $key => $value) {
}
echo '';
$i ++;
}
-?>
-
-
+?>
+
+
+
-
+
\ No newline at end of file
+
diff --git a/views/advserver.model.php b/views/advserver.model.php
index 2b13cf7..3ff44cf 100644
--- a/views/advserver.model.php
+++ b/views/advserver.model.php
@@ -33,7 +33,7 @@
-
+
|
diff --git a/views/hardware.extension.php b/views/hardware.extension.php
index e7eefed..32d1e0a 100644
--- a/views/hardware.extension.php
+++ b/views/hardware.extension.php
@@ -18,9 +18,9 @@ if (!empty($this->sccpvalues['system_rouminguser'])) {
-
+
@@ -39,12 +39,12 @@ if (!empty($this->sccpvalues['system_rouminguser'])) {
function DispayPhoneActionsKeyFormatter(value, row, index) {
var exp_dev = '';
var rmn_dev = '';
- exp_dev += ' ';
- exp_dev += '';
+ exp_dev += " ";
+ exp_dev += "";
if (rmn_dev == 'yes') {
- exp_dev += ' ';
+ exp_dev += " ";
}
return exp_dev;
- return ' ';
+ return " ";
}
diff --git a/views/hardware.phone.php b/views/hardware.phone.php
index cf83ae4..a18f259 100644
--- a/views/hardware.phone.php
+++ b/views/hardware.phone.php
@@ -14,7 +14,7 @@
-
+
|
diff --git a/views/hardware.sphone.php b/views/hardware.sphone.php
index 7ee550d..7d5094a 100644
--- a/views/hardware.sphone.php
+++ b/views/hardware.sphone.php
@@ -14,7 +14,7 @@
-
+
|
- |
+ |
|
|
|
@@ -51,9 +51,9 @@
exp_model += ' \n';
-
+
} else {
exp_model += ' \n';
exp_model += ' ';
@@ -71,13 +71,13 @@
exp_model += ' + ' + row['addon'];
}
}
- return exp_model;
+ return exp_model;
}
function LineFormatterS(value, row, index) {
if (value === null) {
return '-- EMPTY --';
}
- var data = value.split(";");
+ var data = value.split(";");
result = '';
for (var i = 0; i < data.length; i++) {
var val = data[i].split(',');
@@ -87,5 +87,5 @@
}
return result;
}
-
-
\ No newline at end of file
+
+