Automagically clear and focus ID field when audit modal closes

Closes #533
This commit is contained in:
2023-05-22 11:48:24 +01:00
parent 36b9e40a8c
commit 2f5e7b8366
3 changed files with 6 additions and 2 deletions

View File

@@ -35,6 +35,11 @@
function onAuditClick(assetID) {
$('#' + assetID).remove();
}
$('#modal').on('hidden.bs.modal', function (e) {
searchbar = document.getElementById('id_q');
searchbar.value = "";
setTimeout(searchbar.focus(), 2000);
})
</script>
{% endblock %}