display of calendar form

This commit is contained in:
2022-06-06 17:11:43 +02:00
parent c31886fea3
commit 543d30acb9
12 changed files with 79 additions and 37 deletions

View File

@@ -24,12 +24,15 @@
<div id="add-persons"></div>
<h2 class="chill-red">{{ 'Calendar data'|trans }}</h2>
<div id="schedule"></div>
{%- if form.location is defined -%}
{{ form_row(form.location) }}
<div id="location"></div>
{% endif %}
<h2 class="chill-red">{{ 'Calendar data'|trans }}</h2>
{%- if form.startDate is defined -%}
{{ form_row(form.startDate) }}
@@ -77,7 +80,7 @@
</li>
<li>
<button class="btn btn-create" type="submit">
{{ 'Update'|trans }}
{{ 'Save'|trans }}
</button>
</li>
</ul>

View File

@@ -15,10 +15,6 @@
{% 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 }};

View File

@@ -17,10 +17,6 @@
{{ parent() }}
{{ encore_entry_script_tags('mod_pickentity_type') }}
<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.entity = {{ entity_json|json_encode|raw }};
</script>
{{ encore_entry_script_tags('vue_calendar') }}