Fixed creating new template straight after deleting one

This commit is contained in:
laf
2015-07-24 10:28:18 +01:00
parent 0c5aedc1c4
commit 9aa3f2cca5
2 changed files with 2 additions and 1 deletions

View File

@@ -57,6 +57,7 @@ $('#alert-template-removal').click('', function(event) {
if(msg.indexOf("ERROR:") <= -1) {
$("#row_"+template_id).remove();
}
$("#template_id").val('');
$("#message").html('<div class="alert alert-info">'+msg+'</div>');
$("#confirm-delete-alert-template").modal('hide');
},

View File

@@ -34,7 +34,7 @@ echo '<div class="table-responsive">
<td>';
if ($_SESSION['userlevel'] >= '10') {
echo '<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#alert-template">Create new alert template</button>';
echo '<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#alert-template" data-template_id="">Create new alert template</button>';
}
echo '</td>