Files
kimai2/templates/project/edit.html.twig
Kevin Papst d6798eed1e added project start and end date (#1303)
* added sortable js library
* activity in invoice is optional
* added javascript widget for paginated boxes
* fix activity dropdown for globals only
* added timesheet service to reduce code duplication
* use repository to query for teams in dropdowns
* added project validator
* validate project start and end against timesheet
* include begin and end in dynamic form requests for projects
* added timezone and language option to import flag, improve timesheet import speed
* deactivate cross-timezone filter
* add virtual fields to field order list
* composer update
* added param to ignore dates
* position loader icon fixed - fixes #1330
* permission problem when creating a new project - fixes #1340
* remove dev dependencies webserver and thanks bundle
* stop information leak (begin and end date) in duration mode - fixes #1307
* unify timesheet edit dialog for user and admins
* fix security issue, own rates exposed to unauthorized users in multi-update dialog
2020-01-05 02:49:01 +01:00

75 lines
2.7 KiB
Twig

{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
{% import "macros/widgets.html.twig" as widgets %}
{% import "project/actions.html.twig" as actions %}
{% block page_title %}{{ 'admin_project.title'|trans }}{% endblock %}
{% block page_actions %}{{ actions.project(project, 'edit') }}{% endblock %}
{% block main %}
{% set formEditTemplate = app.request.xmlHttpRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %}
{% set formOptions = {
'title': project.name|default('create'|trans),
'form': form,
'back': path('admin_project')
} %}
{% 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) }}
{{ form_row(form.customer) }}
<div class="row">
<div class="col-md-6">
{{ form_row(form.orderNumber) }}
</div>
<div class="col-md-6">
{{ form_row(form.orderDate) }}
</div>
</div>
<div class="row">
<div class="col-md-6">
{{ form_row(form.start) }}
</div>
<div class="col-md-6">
{{ form_row(form.end) }}
</div>
</div>
<fieldset>
{#<legend>Financial data</legend>#}
<div class="row">
<div class="col-md-6">
{{ form_row(form.fixedRate) }}
</div>
<div class="col-md-6">
{{ form_row(form.hourlyRate) }}
</div>
</div>
{% 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 %}
</fieldset>
{{ form_row(form.visible) }}
{% if form.metaFields is defined and form.metaFields is not empty %}
<fieldset>
{#<legend>Custom fields</legend>#}
{{ form_row(form.metaFields) }}
</fieldset>
{% endif %}
{{ form_widget(form) }}
{% endblock %}
{% endembed %}
{% endblock %}