Add function render_toggle

This commit is contained in:
Yiğit Kerem Oktay 2020-08-17 17:00:20 +03:00 committed by GitHub
parent a07ee2131a
commit 46e5af20b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 1 deletions

View File

@ -166,7 +166,20 @@ class Template{
<?php
}
}
/**
* Renders a toggle switch
* Created by Yigit Kerem Oktay
*/
public static fuction render_toggle($toggletext,$input_name){
?>
<div>
<p><?php echo $toggletext; ?></p>
<label class="switch">
<input type="checkbox" name="<?php echo $input_name; ?>" >
<span class="slider round"></span>
</label>
</div>
}
/**
* Renders footer
* @param Boolean $admin decides whether to load admin scripts