diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index cc4e417ba..59f8eb91b 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1256,6 +1256,25 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } } /* }}} */ + /** + * Get attributes for a button opening a modal box + * + * @param array $config contains elements + * target: id of modal box + * remote: URL of data to be loaded into box + * @return string + */ + function getModalBoxLinkAttributes($config) { /* {{{ */ + $attrs = array(); + $attrs[] = array('data-target', '#'.$config['target']); + if(isset($config['remote'])) + $attrs[] = array('href', $config['remote']); + $attrs[] = array('data-toggle', 'modal'); + $attrs[] = array('role', 'button'); + $attrs[] = array('class', $config['class']); + return $attrs; + } /* }}} */ + /** * Get html for button opening a modal box * @@ -1268,6 +1287,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);; function getModalBoxLink($config) { /* {{{ */ $content = ''; $content .= "$attrval) $content .= ' '.$attrname.'="'.$attrval.'"'; diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 88a8acfbe..00435adb7 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -305,9 +305,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $dms = $this->params['dms']; $accessobject = $this->params['accessobject']; echo "