From b378d9e762b09a4eaf2c97195abcf68b28e9e097 Mon Sep 17 00:00:00 2001 From: Aldemir Akpinar Date: Fri, 30 Jun 2017 06:03:44 +0300 Subject: [PATCH] webui: Set correct button text when editing an alert template (#6916) --- html/includes/modal/alert_template.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/html/includes/modal/alert_template.inc.php b/html/includes/modal/alert_template.inc.php index 32b4698b6a..e4c91238ef 100644 --- a/html/includes/modal/alert_template.inc.php +++ b/html/includes/modal/alert_template.inc.php @@ -102,8 +102,10 @@ $('#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'); + if(action == 'edit') { $('#template_id').val(template_id); + $('#create-template').text('Update template'); $.ajax({ type: "POST", url: "ajax_form.php", @@ -124,6 +126,7 @@ $('#alert-template').on('hide.bs.modal', function(event) { $('#line').val(''); $('#value').val(''); $('#name').val(''); + $('#create-template').text('Create template'); }); $('#create-template').click('', function(e) {