102 lines
2.5 KiB
Twig

<h1>{{ "Update activity"|trans }}</h1>
{{ form_start(edit_form) }}
{{ form_errors(edit_form) }}
{%- if edit_form.emergency is defined -%}
{{ form_row(edit_form.emergency) }}
{% endif %}
{%- if edit_form.sentReceived is defined -%}
{{ form_row(edit_form.sentReceived) }}
{% endif %}
{%- if edit_form.user is defined -%}
{{ form_row(edit_form.user) }}
{% endif %}
{%- if edit_form.scope is defined -%}
{{ form_row(edit_form.scope) }}
{% endif %}
{%- if edit_form.socialActions is defined -%}
{{ form_row(edit_form.socialActions) }}
{% endif %}
{%- if edit_form.socialIssues is defined -%}
{{ form_row(edit_form.socialIssues) }}
{% endif %}
{%- if edit_form.reasons is defined -%}
{{ form_row(edit_form.reasons) }}
{% endif %}
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
{%- if edit_form.persons is defined -%}
{{ form_widget(edit_form.persons) }}
{% endif %}
{%- if edit_form.thirdParties is defined -%}
{{ form_widget(edit_form.thirdParties) }}
{% endif %}
{%- if edit_form.users is defined -%}
{{ form_widget(edit_form.users) }}
{% endif %}
<div id="add-persons"></div>
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2>
{%- if edit_form.date is defined -%}
{{ form_row(edit_form.date) }}
{% endif %}
.. location
{%- if edit_form.durationTime is defined -%}
{{ form_row(edit_form.durationTime) }}
{% endif %}
{%- if edit_form.travelTime is defined -%}
{{ form_row(edit_form.travelTime) }}
{% endif %}
{%- if edit_form.comment is defined -%}
.. public and private
{{ form_row(edit_form.comment) }}
{% endif %}
{%- if edit_form.documents is defined -%}
{{ form_row(edit_form.documents) }}
{% endif %}
{%- if edit_form.attendee is defined -%}
{{ form_row(edit_form.attendee) }}
{% endif %}
.. status
{% set person_id = null %}
{% if entity.person %}
{% set person_id = entity.person.id %}
{% endif %}
{% set accompanying_course_id = null %}
{% if accompanyingCourse %}
{% set accompanying_course_id = accompanyingCourse.id %}
{% endif %}
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('chill_activity_activity_show', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id } ) }}" class="sc-button bt-cancel">
{{ 'Cancel'|trans }}
</a>
</li>
<li>
<button class="sc-button bt-update" type="submit">{{ 'Save activity'|trans }}</button>
</li>
</ul>
{{ form_end(edit_form) }}
{# {{ form(delete_form) }} #}