|
42 | 42 |
|
43 | 43 | let minCurrent=parseInt(data.settings.current_min.toFixed(1)); |
44 | 44 | let maxCurrent=parseInt(data.settings.current_max.toFixed(1)); |
45 | | - let lcdlock=parseInt(data.settings.lcdlock); |
46 | | - if (lcdlock) |
47 | | - document.getElementById("lcdlock").checked = true; |
48 | 45 |
|
49 | 46 | // Initialize at page load |
50 | 47 | // value 0 = no override |
|
262 | 259 | $('#mqtt_topic_prefix').val(data.mqtt.topic_prefix); |
263 | 260 | } |
264 | 261 |
|
| 262 | + if (data.settings.lcdlock == 1) { |
| 263 | + document.getElementById("lcdlock").checked = true; |
| 264 | + document.getElementById("lcdlock_label").classList.remove("ui-checkbox-off") |
| 265 | + document.getElementById("lcdlock_label").classList.add("ui-checkbox-on") |
| 266 | + } else { |
| 267 | + document.getElementById("lcdlock").checked = false; |
| 268 | + document.getElementById("lcdlock_label").classList.remove("ui-checkbox-on") |
| 269 | + document.getElementById("lcdlock_label").classList.add("ui-checkbox-off") |
| 270 | + } |
| 271 | + |
265 | 272 | if (data.ocpp) { |
266 | 273 | if (data.ocpp.mode == "Enabled") { |
267 | 274 | $('[id=ocpp_settings]').show(); |
@@ -1057,12 +1064,16 @@ <h1 id="serialnr" class="h5 mb-0 text-white-800">SmartEVSE-</h1> |
1057 | 1064 | <button onclick="update()" style="width: 100px; display:inline-block;" title="Update your firmware">Update</button> |
1058 | 1065 | <button onclick="rawData()" style="width: 120px; display:inline-block;" title="Display your settings in JSON format">Raw Data</button> |
1059 | 1066 | </div> |
1060 | | -<!-- <div class="col"> |
1061 | | - <label for="lcdlock" style="width: 140px; display:inline-block;" title="Lock buttons on LCD screen">LCD Lock</label> |
1062 | | - <input type="checkbox" id="lcdlock" value="lcdlock" onclick="toggleLCDlock()"> |
1063 | | - </div> |
1064 | | ---> |
1065 | 1067 | </div> |
| 1068 | + <div class="row no-gutters align-items-center"> |
| 1069 | + <div class="col-auto h5 mb-0 mr-3 font-weight-bold text-gray-800" style="width: 120px;"> |
| 1070 | + LCD: |
| 1071 | + </div> |
| 1072 | + <div class="col"> |
| 1073 | + <input type="checkbox" class="form-check-input" id="lcdlock" onclick="toggleLCDlock()"> |
| 1074 | + <label class="form-check-label" style="width: 140px; display:inline-block;" for="lcdlock" id="lcdlock_label" title="Lock buttons on LCD screen">LCD Lock</label> |
| 1075 | + </div> |
| 1076 | + </div> |
1066 | 1077 | <div class="row no-gutters align-items-center with_modem"> |
1067 | 1078 | <div class="col-auto h5 mb-0 mr-3 font-weight-bold text-gray-800" style="width: 120px;"> |
1068 | 1079 | Override PWM: |
@@ -1130,8 +1141,8 @@ <h1 id="serialnr" class="h5 mb-0 text-white-800">SmartEVSE-</h1> |
1130 | 1141 | OCPP: |
1131 | 1142 | </div> |
1132 | 1143 | <div class="col"> |
1133 | | - <input type="checkbox" class="form-check-input" id="enable_ocpp" onclick="toggleEnableOcpp()" title="Check to enable connection to a backoffice provider"> |
1134 | | - <label class="form-check-label" for="enable_ocpp" id="enable_ocpp_label">Enable OCPP</label> |
| 1144 | + <input type="checkbox" class="form-check-input" id="enable_ocpp" onclick="toggleEnableOcpp()"> |
| 1145 | + <label class="form-check-label" for="enable_ocpp" id="enable_ocpp_label" title="Check to enable connection to a backoffice provider">Enable OCPP</label> |
1135 | 1146 | <div id="ocpp_settings" style="display: none;"> |
1136 | 1147 | <div class="row no-gutters align-items-center" style="margin-top:20px;margin-bottom:10px"> |
1137 | 1148 | <div class="col-auto h5 mb-0 mr-3 font-weight-bold text-gray-800" style="width: 200px"> |
|
0 commit comments