Commit 78121a5a by Bence Dányi

firewall_gui: audiovisual(!) feedback when save fails

parent 5a17c366
...@@ -333,7 +333,14 @@ function EntityController(url, init) { ...@@ -333,7 +333,14 @@ function EntityController(url, init) {
} }
}).error(function(data) { }).error(function(data) {
try { try {
var audio = new Audio();
audio.src = '/static/img/trombone.ogg';
audio.play();
data = JSON.parse(data.responseText); data = JSON.parse(data.responseText);
$('button[type=submit]').addClass('btn-danger');
setTimeout(function(){
$('button[type=submit]').removeClass('btn-danger');
}, 4000);
var newErrors = {}; var newErrors = {};
for (var i in data) { for (var i in data) {
var id = $('#' + i).length ? i : 'targetName'; var id = $('#' + i).length ? i : 'targetName';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment