Add on-off switch template

Addresses #3513
This commit is contained in:
emanuele-f 2020-05-21 17:21:11 +02:00
parent 857629ccf0
commit eea288dee9
11 changed files with 159 additions and 160 deletions

View file

@ -3383,17 +3383,6 @@ 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
-- ##############################################
--- Return an HTML `select` element with passed options.
--
function generate_select(id, name, is_required, is_disabled, options, additional_classes)