Add general modal functions

The two generic modals are defined in the base template, and are used
in various templates. So provide functions and remove duplicate code.
This commit is contained in:
corubba
2022-05-19 00:53:20 +02:00
parent 1961581527
commit 70450315ba
6 changed files with 22 additions and 34 deletions

View File

@ -298,6 +298,18 @@
}
});
});
function showErrorModal(message) {
var modal = $('#modal_error');
modal.find('.modal-body p').text(message);
modal.modal('show');
}
function showSuccessModal(message) {
var modal = $("#modal_success");
modal.find('.modal-body p').text(message);
modal.modal('show');
}
</script>
{% endif %}
{%- endassets %}