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:
Aldemir Akpinar
2017-08-12 22:21:13 +03:00
committed by Neil Lathwood
parent 0ebf436d47
commit 34d0fc3199
7 changed files with 90 additions and 29 deletions

View File

@@ -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!";