controller return json to vue via twig, corrections

This commit is contained in:
2021-05-27 18:41:22 +02:00
parent 65ac9a47b4
commit 9ec2a62fb6
4 changed files with 11 additions and 6 deletions

View File

@@ -29,7 +29,7 @@
<script src="{{ asset('build/async_upload.js') }}" type="text/javascript"></script>
<script type="text/javascript">
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|e('js') }};
window.activity = {{ activity_json|json_encode|raw }};
</script>
{{ encore_entry_script_tags('vue_activity') }}
{% endblock %}

View File

@@ -13,7 +13,7 @@
<script src="{{ asset('build/async_upload.js') }}" type="text/javascript"></script>
<script type="text/javascript">
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|e('js') }};
window.activity = {{ activity_json|json_encode|raw }};
</script>
{{ encore_entry_script_tags('vue_activity') }}
{% endblock %}