diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 11523b4ee..d001c43ba 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -70,6 +70,7 @@ class e_form private $_inline_token; public $_snippets = false; // use snippets or not. - experimental, and may be removed - use at own risk. private $_fontawesome = false; + private $_bootstrap; private $_helptip = 1; /** * @var user_class @@ -96,6 +97,11 @@ class e_form $this->_fontawesome = true; } + if(deftrue('BOOTSTRAP')) + { + $this->_bootstrap = (int) BOOTSTRAP; + } + $this->_helptip = (int) e107::getPref('admin_helptip', 1); } @@ -649,19 +655,35 @@ class e_form $navigation = isset($options['navigation']) ? $options['navigation'] : true; $indicate = isset($options['indicators']) ? $options['indicators'] : true; + $prefix = ($this->_bootstrap > 4) ? 'data-bs-' : 'data-'; + + $att = [ + 'id' => $name, + 'class' => 'carousel slide' + ]; + + $att[$prefix.'ride'] = 'carousel'; + + if(isset($options['wrap'])) + { + $att[$prefix.'wrap'] = (bool) $options['wrap']; + } + + if(isset($options['interval'])) + { + $att[$prefix.'interval'] = (int) $options['interval']; + } + + if(isset($options['pause'])) + { + $att[$prefix.'pause'] = (string) $options['pause']; + } + $start = ' -