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 "@ChillMain/layout.html.twig" %}
|
|
|
|
{% block title 'Update calendar'|trans %}
|
|
|
|
{% block content %}
|
|
<div class="calendar-edit">
|
|
|
|
<div id="calendar"></div> {# <=== vue component #}
|
|
{% include 'ChillCalendarBundle:Calendar:edit.html.twig' with {'context': 'user'} %}
|
|
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block js %}
|
|
{{ parent() }}
|
|
<script type="text/javascript">
|
|
window.addEventListener('DOMContentLoaded', function (e) {
|
|
chill.displayAlertWhenLeavingModifiedForm('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.entity = {{ entity_json|json_encode|raw }};
|
|
window.startDate = {{ entity.startDate|date('Y-m-d H:i:s')|json_encode|raw }};
|
|
window.endDate = {{ entity.endDate|date('Y-m-d H:i:s')|json_encode|raw }};
|
|
window.mainUser = {{ entity.mainUser.id }};
|
|
</script>
|
|
{{ encore_entry_script_tags('vue_calendar') }}
|
|
{% endblock %}
|
|
|
|
{% block css %}
|
|
{{ parent() }}
|
|
{{ encore_entry_link_tags('vue_calendar') }}
|
|
{% endblock %}
|