From bea05876344ba4f2e2f632637bfdd9f39581dcfa Mon Sep 17 00:00:00 2001 From: f0o Date: Sun, 30 Aug 2015 18:05:57 +0100 Subject: [PATCH] Fixed edit-javascript --- html/includes/forms/parse-alert-template.inc.php | 6 ++++-- html/includes/modal/alert_template.inc.php | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/html/includes/forms/parse-alert-template.inc.php b/html/includes/forms/parse-alert-template.inc.php index 31dc3c714..2b8bb2e56 100644 --- a/html/includes/forms/parse-alert-template.inc.php +++ b/html/includes/forms/parse-alert-template.inc.php @@ -21,8 +21,10 @@ $template_id = ($_POST['template_id']); if (is_numeric($template_id) && $template_id > 0) { $template = dbFetchRow('SELECT * FROM `alert_templates` WHERE `id` = ? LIMIT 1', array($template_id)); $output = array( - 'template' => $template['template'], - 'name' => $template['name'], + 'template' => $template['template'], + 'name' => $template['name'], + 'title' => $template['title'], + 'title_rec' => $template['title_rec'], ); echo _json_encode($output); } diff --git a/html/includes/modal/alert_template.inc.php b/html/includes/modal/alert_template.inc.php index bef4957a2..8e96f3032 100644 --- a/html/includes/modal/alert_template.inc.php +++ b/html/includes/modal/alert_template.inc.php @@ -115,6 +115,8 @@ $('#alert-template').on('show.bs.modal', function (event) { success: function(output) { $('#template').val(output['template']); $('#name').val(output['name']); + $('#title').val(output['title']); + $('#title_rec').val(output['title_rec']); } }); }