mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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 button = $(event.relatedTarget);
|
||||||
var template_id = button.data('template_id');
|
var template_id = button.data('template_id');
|
||||||
var action = button.data('template_action');
|
var action = button.data('template_action');
|
||||||
|
$('#template').val();
|
||||||
$('#line').val('');
|
$('#line').val('');
|
||||||
$('#value').val('');
|
$('#value').val('');
|
||||||
if(action == 'edit') {
|
if(action == 'edit') {
|
||||||
@@ -110,7 +111,7 @@ $('#alert-template').on('show.bs.modal', function (event) {
|
|||||||
data: { type: "parse-alert-template", template_id: template_id },
|
data: { type: "parse-alert-template", template_id: template_id },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(output) {
|
success: function(output) {
|
||||||
$('#template').append(output['template']);
|
$('#template').val(output['template']);
|
||||||
$('#name').val(output['name']);
|
$('#name').val(output['name']);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user