mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #1636 from laf/issue-1617
Fix bug with edit/create template re-using template
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user