more parameters can be passed to getModalBoxLink() and getModalBox()

This commit is contained in:
Uwe Steinmann 2020-10-22 18:16:44 +02:00
parent 80453c7e2e
commit 19ab11f595

View File

@ -1106,7 +1106,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
*/
function getModalBoxLink($config) { /* {{{ */
$content = '';
$content .= "<a data-target=\"#".$config['target']."\" href=\"".$config['remote']."\" role=\"button\" class=\"btn\" data-toggle=\"modal\">".$config['title']."…</a>\n";
$content .= "<a data-target=\"#".$config['target']."\"".(isset($config['remote']) ? " href=\"".$config['remote']."\"" : "")." role=\"button\" class=\"".(isset($config['class']) ? $config['class'] : "btn")."\" data-toggle=\"modal\"";
if(!empty($config['attributes'])) {
foreach($config['attributes'] as $attrname=>$attrval)
$content .= ' '.$attrname.'="'.$attrval.'"';
}
$content .= ">".$config['title']."…</a>\n";
return $content;
} /* }}} */
@ -1126,8 +1131,13 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="'.$config['id'].'Label">'.$config['title'].'</h3>
</div>
<div class="modal-body">
<p>'.getMLText('tree_loading').'</p>
<div class="modal-body">
';
if(!empty($config['content']))
$content .= $config['content'];
else
$content .= '<p>'.getMLText('data_loading').'</p>';
$content .= '
</div>
<div class="modal-footer">
';