mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix #4275 - custom title
This commit is contained in:
@@ -18,6 +18,24 @@ $select_modes = array(
|
|||||||
'2' => 'devices and services',
|
'2' => 'devices and services',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (defined('SHOW_SETTINGS')) {
|
||||||
|
$common_output[] = '
|
||||||
|
<form class="form" onsubmit="widget_settings(this); return false;">
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<label for="title" class="control-label">Title: </label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" name="title" placeholder="Custom title for widget" value="'.htmlspecialchars($widget_settings['title']).'">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<button type="submit" class="btn btn-default">Set</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>';
|
||||||
|
} else {
|
||||||
require_once 'includes/object-cache.inc.php';
|
require_once 'includes/object-cache.inc.php';
|
||||||
|
|
||||||
$sql = dbFetchRow('SELECT `settings` FROM `users_widgets` WHERE `user_id` = ? AND `widget_id` = ?', array($_SESSION["user_id"], '1'));
|
$sql = dbFetchRow('SELECT `settings` FROM `users_widgets` WHERE `user_id` = ? AND `widget_id` = ?', array($_SESSION["user_id"], '1'));
|
||||||
@@ -251,3 +269,4 @@ $temp_header[] = '</div>';
|
|||||||
$temp_header[] = '<br style="clear:both;">';
|
$temp_header[] = '<br style="clear:both;">';
|
||||||
|
|
||||||
$common_output = array_merge($temp_header, $temp_output);
|
$common_output = array_merge($temp_header, $temp_output);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user