mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
33 lines
1.1 KiB
Twig
33 lines
1.1 KiB
Twig
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
|
|
|
{% set activeRouteKey = 'chill_activity_activity_new' %}
|
|
|
|
{% block title 'Activity creation' |trans %}
|
|
|
|
{% block content %}
|
|
<div class="activity-new">
|
|
|
|
<div id="activity"></div> {# <=== vue component #}
|
|
{% include 'ChillActivityBundle:Activity:new.html.twig' with {'context': 'person'} %}
|
|
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block js %}
|
|
{{ encore_entry_script_tags('mod_async_upload') }}
|
|
<script type="text/javascript">
|
|
window.addEventListener('DOMContentLoaded', function (e) {
|
|
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.addaddress = {{ add_address|json_encode|raw }};
|
|
</script>
|
|
{{ encore_entry_script_tags('vue_activity') }}
|
|
{% endblock %}
|
|
|
|
{% block css %}
|
|
{{ encore_entry_link_tags('mod_async_upload') }}
|
|
{{ encore_entry_link_tags('vue_activity') }}
|
|
{% endblock %}
|