|
|
@@ -124,7 +124,7 @@
|
|
|
<script lang="text/javascript">
|
|
|
var FORM_SETTINGS = [
|
|
|
"admin_username", "admin_password", "ce_pin", "csn_pin", "reset_pin","packet_repeats",
|
|
|
- "http_repeat_factor", "auto_restart_period","radio_interface_type"
|
|
|
+ "http_repeat_factor", "auto_restart_period", "radio_interface_type"
|
|
|
];
|
|
|
|
|
|
var FORM_SETTINGS_HELP = {
|
|
|
@@ -134,7 +134,9 @@
|
|
|
"requests initiated by the HTTP API. UDP API typically receives " +
|
|
|
"duplicate packets, so more repeats should be used for HTTP.",
|
|
|
auto_restart_period : "Automatically restart the device every number of " +
|
|
|
- "minutes specified. Use 0 for disabled."
|
|
|
+ "minutes specified. Use 0 for disabled.",
|
|
|
+ radio_interface_type : "2.4 GHz radio model. Only change this if you know " +
|
|
|
+ "You're not using an NRF24L01!"
|
|
|
}
|
|
|
|
|
|
var UDP_PROTOCOL_VERSIONS = [ 5, 6 ];
|
|
|
@@ -244,8 +246,7 @@
|
|
|
|
|
|
if (field.length > 0) {
|
|
|
if (field.attr('type') === 'radio') {
|
|
|
- console.log(field.filter('[value="' + val + '"]'));
|
|
|
- field.filter('[value="' + val + '"]').attr('checked', 'checked');
|
|
|
+ field.filter('[value="' + val[k] + '"]').click();
|
|
|
} else {
|
|
|
field.val(val[k]);
|
|
|
}
|
|
|
@@ -546,12 +547,15 @@
|
|
|
|
|
|
FORM_SETTINGS.forEach(function(k) {
|
|
|
var elmt = '<div class="form-entry">';
|
|
|
+ elmt += '<div>';
|
|
|
elmt += '<label for="' + k + '">' + k + '</label>';
|
|
|
|
|
|
if (FORM_SETTINGS_HELP[k]) {
|
|
|
elmt += '<div class="field-help" data-help-text="' + FORM_SETTINGS_HELP[k] + '"></div>';
|
|
|
}
|
|
|
|
|
|
+ elmt += '</div>';
|
|
|
+
|
|
|
if(k === "radio_interface_type") {
|
|
|
elmt += '<div class="btn-group" id="radio_interface_type" data-toggle="buttons">' +
|
|
|
'<label class="btn btn-secondary active">' +
|