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

Bootswitch styling.

This commit is contained in:
Cameron
2017-02-10 09:16:40 -08:00
parent 503fa926ac
commit a631bd5195
4 changed files with 26 additions and 4 deletions

View File

@@ -2322,6 +2322,16 @@ class e_form
$options_off = array_merge($options, array('class' => 'e-expandit-off'));
}
if(deftrue('e_DEBUG') && e_ADMIN_AREA === true && empty($label_enabled) && empty($label_disabled))
{
$options['switch'] = 'small';
$options['wrapperClass'] = 'wrapper form-control';
$label_enabled = strtoupper(LAN_ON);
$label_disabled = strtoupper(LAN_OFF);
}
$options_on['label'] = $label_enabled ? defset($label_enabled, $label_enabled) : LAN_ENABLED;
$options_off['label'] = $label_disabled ? defset($label_disabled, $label_disabled) : LAN_DISABLED;
@@ -2341,6 +2351,12 @@ class e_form
),
);
if(isset($options['wrapperClass']))
{
$js_options[$name]['wrapperClass'] = $options['wrapperClass'];
}
e107::library('load', 'bootstrap.switch');
e107::js('settings', array('bsSwitch' => $js_options));
e107::js('footer', '{e_WEB}js/bootstrap.switch.init.js', 'jquery', 5);