disable notie overlayClickDismiss in base.html

This commit is contained in:
Son NK 2019-07-06 17:49:16 +02:00 committed by Son NK
parent 84fc5afedb
commit 62cbcb249b
2 changed files with 10 additions and 7 deletions

View File

@ -96,7 +96,7 @@
<td>
<form method="post" id="delete-client-form">
<form method="post">
<input type="hidden" name="form-name" value="delete-client">
<input type="hidden" name="client-id" value="{{ client.id }}">
<a href="javascript:{}"
@ -132,12 +132,6 @@
e.clearSelection();
});
// the modal does not get close when user clicks outside of modal
// necessary for obligatory modal such as the one displayed when user enable/display email forwarding
notie.setOptions({
overlayClickDismiss: false,
});
$(".delete-client").on("click", function (e) {
notie.confirm({
text: "This operation is not reversible, please confirm",

View File

@ -103,6 +103,15 @@
console.log("Init sentry");
Sentry.init({dsn: 'https://ad2187ed843340a1b4165bd8d5d6cdce@sentry.io/1478143'});
{% endif %}
require(['clipboard', 'notie', 'jquery'], function (Clipboard, notie, $) {
// the modal does not get close when user clicks outside of modal
// necessary for obligatory modal such as the one displayed when user enable/display email forwarding
notie.setOptions({
overlayClickDismiss: false,
});
});
</script>
<!-- For additional script -->