Fix for toggles not showing up right in model backend settings

This commit is contained in:
ebolam
2023-07-15 15:20:18 -04:00
parent bc337bf090
commit aaec472f73
2 changed files with 7 additions and 0 deletions

View File

@@ -4188,6 +4188,10 @@ function selected_model_info(sent_data) {
toggle.checked = item['default'];
toggle.onclick = onchange_event;
toggle.setAttribute("data_type", item['unit']);
toggle.classList.add("bootstrap_toggle");
$('.bootstrap_toggle').bootstrapToggle('state', item['default']);
toggle.classList.remove("bootstrap_toggle");
toggle.setAttribute("refresh_model_inputs", item['refresh_model_inputs']);
if ('check' in item) {
toggle.check_data = item['check'];

View File

@@ -1863,6 +1863,9 @@ function selected_model_info(sent_data) {
toggle.onclick = onchange_event;
toggle.setAttribute("data_type", item['unit']);
toggle.setAttribute("refresh_model_inputs", item['refresh_model_inputs']);
toggle.classList.add("bootstrap_toggle");
$('.bootstrap_toggle').bootstrapToggle('state', item['default']);
toggle.classList.remove("bootstrap_toggle");
if ('check' in item) {
toggle.check_data = item['check'];
} else {