1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 22:57:14 +02:00

Added 'active' class to checked checkboxes.

This commit is contained in:
Cameron
2015-02-22 16:33:48 -08:00
parent 91418c61d3
commit 45ca6af482

View File

@@ -1296,8 +1296,10 @@ class e_form
$options['checked'] = $checked; //comes as separate argument just for convenience
$text = "";
$pre = (vartrue($options['label'])) ? "<label class='checkbox'>" : ""; // Bootstrap compatible markup
$active = ($checked === true) ? " active" : ""; // allow for styling if needed.
$pre = (vartrue($options['label'])) ? "<label class='checkbox".$active."'>" : ""; // Bootstrap compatible markup
$post = (vartrue($options['label'])) ? $options['label']."</label>" : "";
unset($options['label']); // not to be used as attribute;