WIP: create and edit calendar

This commit is contained in:
2022-05-11 17:47:33 +02:00
parent f4b1a25a67
commit c60a54eb39
11 changed files with 217 additions and 69 deletions

View File

@@ -3,9 +3,6 @@
{{ form_start(form) }}
{{ form_errors(form) }}
{%- if form.mainUser is defined -%}
{{ form_row(form.mainUser) }}
{% endif %}
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>

View File

@@ -118,10 +118,17 @@
{% endif %}
<ul class="record_actions">
<ul class="record_actions sticky-form-buttons">
{% if accompanyingCourse.user is not same as(null) %}
<li>
<a href="{{ path('chill_calendar_calendar_new', {'user_id': user_id, 'accompanying_period_id': accompanying_course_id, 'mainUser': accompanyingCourse.user.id }) }}" class="btn btn-create">
{{ 'chill_calendar.Create for referrer'|trans }}
</a>
</li>
{% endif %}
<li>
<a href="{{ path('chill_calendar_calendar_new', {'user_id': user_id, 'accompanying_period_id': accompanying_course_id}) }}" class="btn btn-create">
{{ 'Add a new calendar' | trans }}
{{ 'Create'|trans }}
</a>
</li>
</ul>

View File

@@ -3,12 +3,13 @@
{{ form_start(form) }}
{{ form_errors(form) }}
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
{%- if form.mainUser is defined -%}
{{ form_row(form.mainUser) }}
{% endif %}
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
{%- if form.persons is defined -%}
{{ form_widget(form.persons) }}
{% endif %}

View File

@@ -15,6 +15,7 @@
{% block js %}
{{ 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 }}"]',
@@ -28,6 +29,7 @@
{% block css %}
{{ parent() }}
{{ encore_entry_link_tags('vue_calendar') }}
{{ encore_entry_link_tags('mod_pickentity_type') }}
{% endblock %}
{% block block_post_menu %}