Some cleanup and changes. Trying to get self-update to work, no luck

This commit is contained in:
Gunnar Skjold
2020-05-22 22:26:31 +02:00
parent 0c92f7401c
commit cff6c02d57
5 changed files with 30 additions and 16 deletions

View File

@@ -40,6 +40,19 @@ $(function() {
}
});
$('#mqttSsl').on('change', function() {
var port = $('#mqttPort');
if($(this).is(':checked')) {
if(port.val() == 1883) {
port.val(8883);
}
} else {
if(port.val() == 8883) {
port.val(1883);
}
}
});
$('#mqttEnable').trigger('change');
$('#mqttPayloadFormat').trigger('change');

View File

@@ -16,7 +16,7 @@
<div class="input-group-prepend">
<span class="input-group-text">Port</span>
</div>
<input type="number" class="form-control mqtt-config" name="mqttPort" value="${config.mqttPort}" min="1024" max="65535" placeholder="1883"/>
<input id="mqttPort" type="number" class="form-control mqtt-config" name="mqttPort" value="${config.mqttPort}" min="1024" max="65535" placeholder="1883"/>
</div>
</div>
<div class="col-xl-3 col-lg-4 col-md-6 col-sm-8">

View File

@@ -1,4 +1,4 @@
<div class="alert alert-warning">!!WARNING!!<br/>Do not change anything here unless you know exactly what you are doing! Changing things here coulds cause the device to stop responding</div>
<div class="alert alert-warning">!!WARNING!!<br/>Do not change anything here unless you know exactly what you are doing! Changing things here could cause the device to stop responding</div>
<form method="post" action="/save">
<input type="hidden" name="sysConfig" value="true"/>
<div class="my-3 p-3 bg-white rounded shadow">