Fix toggle

This commit is contained in:
Yiğit Kerem Oktay 2020-08-17 18:00:13 +03:00 committed by GitHub
parent 1539375b39
commit dc1cf2691c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -170,12 +170,12 @@ class Template{
* Renders a toggle switch
* Created by Yigit Kerem Oktay
*/
public static function render_toggle($toggletext,$input_name,$checked=false){
public static function render_toggle($toggletext,$input_name,$checked){
?>
<div>
<h3><?php echo $toggletext; ?></h3>
<label class="switch">
<input type="checkbox" name="<?php echo $input_name; ?>" <?php if($checked){ echo $checked; } ?> >
<input type="checkbox" name="<?php echo $input_name; ?>" <?php if($checked){ echo "checked"; } ?> >
<span class="slider round"></span>
</label>
</div>