set data-remote of button to open a modal box with content loaded from remote

This commit is contained in:
Uwe Steinmann 2022-11-24 11:01:31 +01:00
parent 7854f75c8c
commit d3d7956f4e

View File

@ -1363,8 +1363,10 @@ function getOverallStatusIcon($status) { /* {{{ */
function getModalBoxLinkAttributes($config) { /* {{{ */
$attrs = array();
$attrs[] = array('data-target', '#'.$config['target']);
if(isset($config['remote']))
if(isset($config['remote'])) {
$attrs[] = array('href', $config['remote']);
$attrs[] = array('data-remote', $config['remote']);
}
$attrs[] = array('data-toggle', 'modal');
$attrs[] = array('role', 'button');
if(isset($config['class'])) {