mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-06-15 04:26:05 +00:00
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:
@ -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 %}
|
||||
|
Reference in New Issue
Block a user