fix #4275 - custom title

This commit is contained in:
crcro
2016-09-06 02:44:55 +03:00
parent 7a5f9d5a41
commit 4e5bd343b5

View File

@@ -18,6 +18,24 @@ $select_modes = array(
'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';
$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;">';
$common_output = array_merge($temp_header, $temp_output);
}