Skip to content

Commit

Permalink
clear add form result
Browse files Browse the repository at this point in the history
  • Loading branch information
howeyc committed Apr 26, 2021
1 parent 3e665e9 commit 814fcca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/lweb/templates/template.addtransaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,16 @@ <h1>Add Transaction</h1>
} else {
$('#formresultbox').addClass("bg-danger");
}
$('#formresult').html(jqxhr.responseText);
$('#formresult').html(jqxhr.responseText);
setTimeout(clearformresult, 5000);
});
return false;
});
function clearformresult() {
$('#formresultbox').removeClass("bg-success");
$('#formresultbox').removeClass("bg-danger");
$('#formresult').html("");
}
</script>

</body>
Expand Down

0 comments on commit 814fcca

Please sign in to comment.