* improve report visibility * fix timesheet duration, which breaks validation * added contributing section in README * do not allow to change project for existing activities - fixes #2576 * bump theme version to fix FOSUserBundle dependency * use entity color instead of inherited one - fixes #2200
51 lines
1.9 KiB
Twig
51 lines
1.9 KiB
Twig
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
|
|
{% import "activity/actions.html.twig" as actions %}
|
|
|
|
{% block page_title %}{{ 'admin_activity.title'|trans }}{% endblock %}
|
|
{% block page_actions %}{{ actions.activity(activity, 'edit') }}{% endblock %}
|
|
|
|
{% block main %}
|
|
{% set formEditTemplate = app.request.xmlHttpRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %}
|
|
{% set formOptions = {
|
|
'title': (activity.id is null ? 'create'|trans : 'edit'|trans({}, 'actions')),
|
|
'form': form,
|
|
'back': path('admin_activity')
|
|
} %}
|
|
{% embed formEditTemplate with formOptions %}
|
|
{% block form_body %}
|
|
<div class="row">
|
|
<div class="col-md-10">
|
|
{{ form_row(form.name) }}
|
|
</div>
|
|
<div class="col-md-2">
|
|
{{ form_row(form.color) }}
|
|
</div>
|
|
</div>
|
|
{{ form_row(form.comment) }}
|
|
{% if form.customer is defined %}
|
|
{{ form_row(form.customer) }}
|
|
{% endif %}
|
|
{% if form.project is defined %}
|
|
{{ form_row(form.project) }}
|
|
{% endif %}
|
|
{% if form.budget is defined %}
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
{{ form_row(form.budget) }}
|
|
</div>
|
|
<div class="col-md-6">
|
|
{{ form_row(form.timeBudget) }}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{{ form_row(form.visible) }}
|
|
{% if form.metaFields is defined and form.metaFields is not empty %}
|
|
{% for meta in form.metaFields|sort((a, b) => a.vars.data.order <=> b.vars.data.order) %}
|
|
{{ form_row(meta) }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{{ form_widget(form) }}
|
|
{% endblock %}
|
|
{% endembed %}
|
|
{% endblock %}
|