add suffix to assets entrypoints + replace link/script html tags by encore_entry twig tag

This commit is contained in:
2021-07-23 12:27:30 +02:00
parent e0dbe9cf9d
commit d20a3cf9d4
9 changed files with 45 additions and 55 deletions

View File

@@ -6,11 +6,11 @@
{% block content %}
<div class="activity-new">
<div id="activity"></div> {# <=== vue component #}
{% include 'ChillActivityBundle:Activity:new.html.twig' with {'context': 'accompanyingCourse'} %}
</div>
<div id="activity"></div> {# <=== vue component #}
{% include 'ChillActivityBundle:Activity:new.html.twig' with {'context': 'accompanyingCourse'} %}
</div>
{% endblock %}
{% block js %}
@@ -18,10 +18,10 @@
{{ encore_entry_script_tags('async_upload') }}
<script type="text/javascript">
window.addEventListener('DOMContentLoaded', function (e) {
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]',
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>
{{ encore_entry_script_tags('vue_activity') }}
{% endblock %}