created generate_switch_toggle function

This commit is contained in:
gabryon99 2020-03-06 15:46:24 +01:00
parent 7b4bdfcf4a
commit aa719d21d7

View file

@ -3391,6 +3391,17 @@ function getFolderSize(path, timeout)
return size
end
-- ##############################################
function generate_switch_toggle(id, label, disabled)
return ([[
<div class="custom-control custom-switch ]]..(disabled and 'disabled' or '') ..[[">
<input type="checkbox" class="custom-control-input" id="]].. id ..[[">
<label class="custom-control-label" for="]].. id ..[[">]].. label ..[[</label>
</div>
]])
end
-- ###########################################
function getHttpUrlPrefix()