mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Button Class: Support additional class(es).
This commit is contained in:
@@ -59,7 +59,9 @@ if (!class_exists('button')) {
|
||||
$button .= $array['onclick'] ? "onclick=".self::quote($array['onclick'])." " : null;
|
||||
$button .= $array['onmouseover'] ? "onmouseenter=".self::quote($array['onmouseover'])." " : null;
|
||||
$button .= $array['onmouseout'] ? "onmouseleave=".self::quote($array['onmouseout'])." " : null;
|
||||
$button .= "class='btn btn-".($array['class'] ? $array['class'] : 'default')." ".($array['disabled'] ? 'disabled' : null)."' ";
|
||||
//detect class addition (using + prefix)
|
||||
$button_class = $array['class'] && $array['class'][0] == '+' ? 'default '.substr($array['class'], 1) : $array['class'];
|
||||
$button .= "class='btn btn-".($button_class ? $button_class : 'default')." ".($array['disabled'] ? 'disabled' : null)."' ";
|
||||
//ensure margin* styles are not applied to the button element when a link is defined
|
||||
if (is_array($array['style']) && @sizeof($array['style']) != 0) {
|
||||
foreach ($array['style'] as $property => $value) {
|
||||
|
||||
Reference in New Issue
Block a user