mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
fix js alert with dom event listener
This commit is contained in:
parent
193e7b4c7e
commit
2cc1274ee0
@ -12,8 +12,10 @@
|
|||||||
{% block js %}
|
{% block js %}
|
||||||
{{ encore_entry_link_tags('async_upload') }}
|
{{ encore_entry_link_tags('async_upload') }}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]',
|
window.addEventListener('DOMContentLoaded', function (e) {
|
||||||
// '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
|
chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]',
|
||||||
|
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
|
||||||
|
});
|
||||||
window.activity = {{ activity_json|json_encode|raw }};
|
window.activity = {{ activity_json|json_encode|raw }};
|
||||||
</script>
|
</script>
|
||||||
{{ encore_entry_script_tags('vue_activity') }}
|
{{ encore_entry_script_tags('vue_activity') }}
|
||||||
|
@ -28,8 +28,10 @@
|
|||||||
{% block js %}
|
{% block js %}
|
||||||
{{ encore_entry_link_tags('async_upload') }}
|
{{ encore_entry_link_tags('async_upload') }}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]',
|
window.addEventListener('DOMContentLoaded', function (e) {
|
||||||
// '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
|
chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]',
|
||||||
|
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
|
||||||
|
});
|
||||||
window.activity = {{ activity_json|json_encode|raw }};
|
window.activity = {{ activity_json|json_encode|raw }};
|
||||||
</script>
|
</script>
|
||||||
{{ encore_entry_script_tags('vue_activity') }}
|
{{ encore_entry_script_tags('vue_activity') }}
|
||||||
|
@ -12,8 +12,10 @@
|
|||||||
{% block js %}
|
{% block js %}
|
||||||
{{ encore_entry_script_tags('async_upload') }}
|
{{ encore_entry_script_tags('async_upload') }}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]',
|
window.addEventListener('DOMContentLoaded', function (e) {
|
||||||
// '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
|
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]',
|
||||||
|
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
|
||||||
|
});
|
||||||
window.activity = {{ activity_json|json_encode|raw }};
|
window.activity = {{ activity_json|json_encode|raw }};
|
||||||
</script>
|
</script>
|
||||||
{{ encore_entry_script_tags('vue_activity') }}
|
{{ encore_entry_script_tags('vue_activity') }}
|
||||||
|
@ -12,8 +12,10 @@
|
|||||||
{% block js %}
|
{% block js %}
|
||||||
{{ encore_entry_link_tags('async_upload') }}
|
{{ encore_entry_link_tags('async_upload') }}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]',
|
window.addEventListener('DOMContentLoaded', function (e) {
|
||||||
// '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
|
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]',
|
||||||
|
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
|
||||||
|
});
|
||||||
window.activity = {{ activity_json|json_encode|raw }};
|
window.activity = {{ activity_json|json_encode|raw }};
|
||||||
</script>
|
</script>
|
||||||
{{ encore_entry_script_tags('vue_activity') }}
|
{{ encore_entry_script_tags('vue_activity') }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user