Extend defaults to all pages
Change enum in installer to correspond to chan-sccp
This commit is contained in:
parent
927186151e
commit
93fe6d45e1
|
@ -169,7 +169,9 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
|||
if ((array) $this->xml_data) {
|
||||
foreach ($this->xml_data->xpath('//page_group[@name="' . $group_name . '"]') as $item) {
|
||||
// TODO: Clean up below after debug
|
||||
if (($group_name == 'sccp_general') || ($group_name == 'sccp_qos_config') || ($group_name =='sccp_dev_config')) {
|
||||
if (($group_name == 'sccp_general') || ($group_name == 'sccp_qos_config') ||
|
||||
($group_name =='sccp_dev_config') || ($group_name =='sccp_dev_group_config') ||
|
||||
($group_name =='sccp_hotline_config') || ($group_name =='sccp_dev_softkey') || ($group_name =='sccp_dev_advconfig')) {
|
||||
$htmlret = load_view(__DIR__ . '/views/formShowSysDefs.php', array(
|
||||
'itm' => $item,
|
||||
'h_show' => $show_Header,
|
||||
|
|
|
@ -1075,7 +1075,6 @@ $(".sccp-restore").click(function() {
|
|||
edit_style.display = 'block';
|
||||
if ($(this).data("type") === 'radio') {
|
||||
// simulate read only for checkboxes
|
||||
|
||||
$(':radio:not(:checked)').attr('disabled', true)
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -342,8 +342,8 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
<name>echocancel</name>
|
||||
<label>Echo Cancel</label>
|
||||
<default>off</default>
|
||||
<button value="on">On</button>
|
||||
<button value="off">Off</button>
|
||||
<button value="yes">On</button>
|
||||
<button value="no">Off</button>
|
||||
<help>Echo Cancel: Echo Cancellation (On or Off).</help>
|
||||
</item>
|
||||
<item type="IS" id="9">
|
||||
|
|
|
@ -171,7 +171,7 @@ function Get_DB_config($sccp_compatible)
|
|||
'disallow' => array('create' => "VARCHAR(255) NULL DEFAULT NULL"),
|
||||
'allow' => array('create' => "VARCHAR(255) NULL DEFAULT NULL"),
|
||||
'id' => array('create' => 'MEDIUMINT(9) NOT NULL AUTO_INCREMENT, ADD UNIQUE(id);', 'modify' => "MEDIUMINT(9)", 'index' => 'id'),
|
||||
'echocancel' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'echocancel' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no')"),
|
||||
'silencesuppression' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'dnd' => array('create' => "enum('off','reject','silent','user') NOT NULL default 'reject'", 'modify' => "enum('off','reject','silent','user')", 'def_modify' => "reject")
|
||||
),
|
||||
|
@ -253,7 +253,7 @@ function Get_DB_config($sccp_compatible)
|
|||
'_callwaiting_tone' => array('create' => "VARCHAR(20) NULL default null", 'modify' => "VARCHAR(20)"),
|
||||
'_callanswerorder' => array('create' => "enum('oldestfirst','latestfirst') NOT NULL default 'latestfirst'",
|
||||
'modify' => "enum('oldestfirst','latestfirst')"),
|
||||
'_echocancel' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'_echocancel' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no')"),
|
||||
'_silencesuppression' => array('create' => "VARCHAR(20) NULL default null", 'modify' => "VARCHAR(20)"),
|
||||
'_sccp_tos' => array('create' => "VARCHAR(11) NOT NULL default '0x68'", 'modify' => "VARCHAR(11)"),
|
||||
'_sccp_cos' => array('create' => "VARCHAR(11) NOT NULL default '0x4'", 'modify' => "VARCHAR(11)"),
|
||||
|
@ -443,7 +443,7 @@ function InstallDB_updateSchema($db_config)
|
|||
}
|
||||
}
|
||||
if (!empty($sql_modify)) {
|
||||
outn("<li>" . _("Modifying table columns") . $tabl_name ."</li>");
|
||||
outn("<li>" . _("Modifying table columns ") . $tabl_name ."</li>");
|
||||
|
||||
$sql_modify = "ALTER TABLE {$tabl_name} " . substr($sql_modify, 0, -2);
|
||||
try {
|
||||
|
|
|
@ -118,16 +118,16 @@ foreach ($items as $child) {
|
|||
</div>
|
||||
<div class="col-md-3">
|
||||
<?php
|
||||
// Can have multiple inputs for a field displayed with a separator
|
||||
// Can have multiple inputs for a field which are displayed with a separator
|
||||
foreach ($child->xpath('input') as $value) {
|
||||
$res_n = (string)$value->name;
|
||||
$res_name = $npref . $res_n;
|
||||
//if (!empty($fvalues[$res_n])) {
|
||||
$value->value = $fvalues[$res_n]['data'];
|
||||
if (!empty($fvalues[$res_n]['data'])) {
|
||||
if (!empty($sccp_defaults[$res_n]['systemdefault']) && ($sccp_defaults[$res_n]['systemdefault'] != $fvalues[$res_n]['data'])) {
|
||||
$usingSysDefaults = false;
|
||||
}
|
||||
$value->value = $fvalues[$res_n]['data'];
|
||||
}
|
||||
}
|
||||
//}
|
||||
// Default to chan-sccp defaults, not xml defaults.
|
||||
|
@ -144,6 +144,9 @@ foreach ($items as $child) {
|
|||
echo $child->nameseparator;
|
||||
}
|
||||
// Output current value
|
||||
if (empty($value->value)) {
|
||||
echo "Value not found for {$res_n}";
|
||||
}
|
||||
echo $value->value;
|
||||
$i ++;
|
||||
}
|
||||
|
|
|
@ -22,10 +22,11 @@
|
|||
$def_val_line = $this->getTableDefaults('sccpline');
|
||||
$def_val_device = $this->getTableDefaults('sccpdevice');
|
||||
|
||||
echo $this->showGroup('sccp_dev_config', 1, 'sccpdevice', $def_val_device);
|
||||
echo $this->showGroup('sccp_dev_group_config', 1, 'sccpline', $def_val_line);
|
||||
echo $this->showGroup('sccp_dev_advconfig', 1, 'sccpdevice', $def_val_device);
|
||||
echo $this->showGroup('sccp_dev_softkey', 1, 'sccpdevice', $def_val_device);
|
||||
echo $this->showGroup('sccp_hotline_config', 1, 'sccpdevice', $def_val_device);
|
||||
//echo $this->showGroup('sccp_dev_config', 1, 'sccpdevice', $def_val_device);
|
||||
echo $this->showGroup('sccp_dev_config', 1);
|
||||
echo $this->showGroup('sccp_dev_group_config', 1);
|
||||
echo $this->showGroup('sccp_dev_advconfig', 1);
|
||||
echo $this->showGroup('sccp_dev_softkey', 1);
|
||||
echo $this->showGroup('sccp_hotline_config', 1);
|
||||
?>
|
||||
</form>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="gridSystemModalLabel_Net">Add New Network</h4>
|
||||
<h4 class="modal-title" id="gridSystemModalLabel_Net">Device</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
|
|
Loading…
Reference in a new issue