Correct defaults after db schema change
This commit is contained in:
parent
646a975a5f
commit
b753482898
|
@ -284,8 +284,6 @@ $(document).ready(function () {
|
||||||
// console.log('HwSelect');
|
// console.log('HwSelect');
|
||||||
var type_id = $('#sccp_hw_type').find(':selected').data('id');
|
var type_id = $('#sccp_hw_type').find(':selected').data('id');
|
||||||
var btn_dev = $('#sccp_hw_type').find(':selected').data('val');
|
var btn_dev = $('#sccp_hw_type').find(':selected').data('val');
|
||||||
// var btn_add=$('#sccp_hw_addon').find(':selected').data('val');
|
|
||||||
|
|
||||||
if (type_id === 1) {
|
if (type_id === 1) {
|
||||||
if ($('#sccp_hw_addon').val() !== 'NONE') {
|
if ($('#sccp_hw_addon').val() !== 'NONE') {
|
||||||
$('#sccp_hw_addon').val('NONE').change();
|
$('#sccp_hw_addon').val('NONE').change();
|
||||||
|
@ -305,7 +303,6 @@ $(document).ready(function () {
|
||||||
$(this).addClass('hidden');
|
$(this).addClass('hidden');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.lineSelect').change(function (e) {
|
$('.lineSelect').change(function (e) {
|
||||||
|
|
|
@ -1304,7 +1304,6 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<name>addon</name>
|
<name>addon</name>
|
||||||
<default>NONE</default>
|
<default>NONE</default>
|
||||||
<class>sccp-custom</class>
|
<class>sccp-custom</class>
|
||||||
<options readonly="readonly"></options>
|
|
||||||
</input>
|
</input>
|
||||||
<help>Addon: Addons are model specific and only work with certain base phones. This phone model is identified as being a phone that does not accept sidecars. Update devmodel if this is not correct.</help>
|
<help>Addon: Addons are model specific and only work with certain base phones. This phone model is identified as being a phone that does not accept sidecars. Update devmodel if this is not correct.</help>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -69,20 +69,14 @@ if (!empty($_REQUEST['id'])) {
|
||||||
$val = implode('.', sscanf($val, '%4s%4s%4s')); // Convert to Cisco display Format
|
$val = implode('.', sscanf($val, '%4s%4s%4s')); // Convert to Cisco display Format
|
||||||
$def_val[$key] = array("keyword" => $key, "data" => $val, "seq" => "99");
|
$def_val[$key] = array("keyword" => $key, "data" => $val, "seq" => "99");
|
||||||
break;
|
break;
|
||||||
case '_hwlang':
|
|
||||||
$tmpar = explode(":", $val);
|
|
||||||
$def_val['netlang'] = array("keyword" => 'netlang', "data" => $tmpar[0], "seq" => "99");
|
|
||||||
$def_val['devlang'] = array("keyword" => 'devlang', "data" => $tmpar[1], "seq" => "99");
|
|
||||||
break;
|
|
||||||
// case 'permit':
|
// case 'permit':
|
||||||
// case 'deny':
|
// case 'deny':
|
||||||
// $def_val[$key . '_net'] = array("keyword" => $key, "data" => before('/', $val), "seq" => "99");
|
// $def_val[$key . '_net'] = array("keyword" => $key, "data" => before('/', $val), "seq" => "99");
|
||||||
// $key = $key . '_mask';
|
// $key = $key . '_mask';
|
||||||
// $val = after('/', $val);
|
// $val = after('/', $val);
|
||||||
// break;
|
// break;
|
||||||
case '_phonepersonalization':
|
case 'phonepersonalization':
|
||||||
$def_val['phonepersonalization'] = array("keyword" => 'phonepersonalization', "data" => $val, "seq" => "99");
|
$def_val['phonepersonalization'] = array("keyword" => 'phonepersonalization', "data" => $val, "seq" => "99");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// Overwrite existing defaults after checking that data is still valid after schema updates
|
// Overwrite existing defaults after checking that data is still valid after schema updates
|
||||||
// Do not strip underscores as these fields are new in the schema and so should be valid.
|
// Do not strip underscores as these fields are new in the schema and so should be valid.
|
||||||
|
@ -104,7 +98,6 @@ if (!empty($_REQUEST['id'])) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($device_warning)) {
|
if (!empty($device_warning)) {
|
||||||
|
|
Loading…
Reference in a new issue