mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Ability to edit default alert template (#7121)
* newfeature: ability to edit default alert template * Fix style errors * Added missing db query * Removed unnecessary code, and added faq section * Minor documentation about default alert template. And put back wrongly removed lines * Fixing the silly old mistakes... again
This commit is contained in:
committed by
Neil Lathwood
parent
0ebf436d47
commit
34d0fc3199
@@ -59,10 +59,14 @@ if (!empty($name)) {
|
||||
} elseif ($_REQUEST['template']) {
|
||||
//Create new template
|
||||
|
||||
if (dbInsert(array('template' => $_REQUEST['template'], 'name' => $name, 'title' => $_REQUEST['title'], 'title_rec' => $_REQUEST['title_rec']), "alert_templates")) {
|
||||
$ok = "Alert template has been created.";
|
||||
if ($name != 'Default Alert Template') {
|
||||
if (dbInsert(array('template' => $_REQUEST['template'], 'name' => $name, 'title' => $_REQUEST['title'], 'title_rec' => $_REQUEST['title_rec']), "alert_templates")) {
|
||||
$ok = "Alert template has been created.";
|
||||
} else {
|
||||
$error = "Could not create alert template";
|
||||
}
|
||||
} else {
|
||||
$error = "Could not create alert template";
|
||||
$error = "This template name is reserved!";
|
||||
}
|
||||
} else {
|
||||
$error = "We could not work out what you wanted to do!";
|
||||
|
||||
Reference in New Issue
Block a user