{% extends kimai_context.modalRequest ? 'form.html.twig' : 'base.html.twig' %}
{% block main %}
{% set formEditTemplate = kimai_context.modalRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %}
{% set formOptions = {
'title': (project.id is null ? 'create-project'|trans({}, 'actions') : 'edit'|trans({}, 'actions')),
'form': form,
'back': path('admin_project')
} %}
{% embed formEditTemplate with formOptions %}
{% block form_body %}
{{ form_row(form.name) }}
{{ form_row(form.color) }}
{{ form_row(form.comment) }}
{{ form_row(form.customer) }}
{{ form_row(form.number) }}
{{ form_row(form.orderNumber) }}
{{ form_row(form.orderDate) }}
{{ form_row(form.start) }}
{{ form_row(form.end) }}
{% if form.budgetType is defined %}
{% if form.budget is defined %}
{{ form_row(form.budget) }}
{% endif %}
{% if form.timeBudget is defined %}
{{ form_row(form.timeBudget) }}
{% endif %}
{{ form_row(form.budgetType) }}
{% endif %}
{% if form.teams is defined %}
{{ form_row(form.teams) }}
{% endif %}
{{ form_row(form.visible) }}
{{ form_row(form.billable) }}
{{ form_row(form.globalActivities) }}
{% if form.metaFields is defined and form.metaFields is not empty %}
{{ form_row(form.metaFields) }}
{% endif %}
{% embed '@theme/embeds/collapsible.html.twig' with {id: 'project_invoice_settings'} %}
{% import "macros/widgets.html.twig" as widgets %}
{% block title %}{{ 'invoices'|trans }}{% endblock %}
{% block body %}
{% if form.invoiceText is defined %}
{{ form_row(form.invoiceText) }}
{% endif %}
{% endblock %}
{% endembed %}
{{ form_rest(form) }}
{% endblock %}
{% endembed %}
{% endblock %}