Add new functionality

This commit is contained in:
Yiğit Kerem Oktay 2020-08-17 17:14:47 +03:00 committed by GitHub
parent 3b4fe3f27c
commit 990462cece
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 * Renders a toggle switch
* Created by Yigit Kerem Oktay * Created by Yigit Kerem Oktay
*/ */
public static function render_toggle($toggletext,$input_name){ public static function render_toggle($toggletext,$input_name,$checked=false){
?> ?>
<div> <div>
<p><?php echo $toggletext; ?></p> <p><?php echo $toggletext; ?></p>
<label class="switch"> <label class="switch">
<input type="checkbox" name="<?php echo $input_name; ?>" > <input type="checkbox" name="<?php echo $input_name; ?>" <?php if($checked){ echo $checked; } ?> >
<span class="slider round"></span> <span class="slider round"></span>
</label> </label>
</div> </div>