From 51e75b3b465665ed512c4ec962d3bbfc001012f1 Mon Sep 17 00:00:00 2001 From: laf Date: Thu, 6 Aug 2015 19:08:36 +0000 Subject: [PATCH] Fix bug with edit/create template re-using template --- html/includes/modal/alert_template.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/includes/modal/alert_template.inc.php b/html/includes/modal/alert_template.inc.php index 168ebf18b..bd034952e 100644 --- a/html/includes/modal/alert_template.inc.php +++ b/html/includes/modal/alert_template.inc.php @@ -100,6 +100,7 @@ $('#alert-template').on('show.bs.modal', function (event) { var button = $(event.relatedTarget); var template_id = button.data('template_id'); var action = button.data('template_action'); + $('#template').val(); $('#line').val(''); $('#value').val(''); if(action == 'edit') { @@ -110,7 +111,7 @@ $('#alert-template').on('show.bs.modal', function (event) { data: { type: "parse-alert-template", template_id: template_id }, dataType: "json", success: function(output) { - $('#template').append(output['template']); + $('#template').val(output['template']); $('#name').val(output['name']); } });