Release 2.40.0 (#5621)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
{% block main %}
|
||||
{% set formEditTemplate = kimai_context.modalRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %}
|
||||
{% set formOptions = {
|
||||
'title': 'create'|trans,
|
||||
'title': (template.isNew() ? 'create'|trans : 'edit'|trans),
|
||||
'form': form,
|
||||
'back': path('export_template_create')
|
||||
} %}
|
||||
|
||||
@@ -219,46 +219,44 @@
|
||||
|
||||
{% block duration_widget %}
|
||||
<div class="duration-widget">
|
||||
<div class="input-group">
|
||||
{% if (form.vars.duration_presets is defined and form.vars.duration_presets is not empty) and (form.vars.disabled is same as (false)) %}
|
||||
<div class="input-group">
|
||||
{% if form.vars.icon is defined and form.vars.icon is not null %}
|
||||
{% if form.vars.icon is defined and form.vars.icon is not null %}
|
||||
<div class="input-group-text">
|
||||
{{ icon(form.vars.icon) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ block('form_widget_simple') }}
|
||||
{% if form.vars.toggle is defined and form.vars.toggle %}
|
||||
<div class="input-group-text">
|
||||
{{ icon(form.vars.icon) }}
|
||||
<a href="#" id="{{ form.vars.id }}_toggle" class="text-success">{{ icon('link') }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ block('form_widget_simple') }}
|
||||
{% if form.vars.toggle is defined and form.vars.toggle %}
|
||||
<div class="input-group-text">
|
||||
<a href="#" id="{{ form.vars.id }}_toggle" class="text-success">{{ icon('link') }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<button type="button" class="input-group-text dropdown-toggle btn-duration-preset" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
|
||||
<div class="dropdown-menu dropdown-menu-end pre-scrollable">
|
||||
<div class="dropdown-menu-columns">
|
||||
{% for index in [0, 1, 2, 3] %}
|
||||
<div class="dropdown-menu-column" style="min-width: 4rem">
|
||||
{% for value in form.vars.duration_presets %}
|
||||
{% if loop.index0 % 4 == index %}
|
||||
<a class="dropdown-item justify-content-center" href="#" data-form-widget="copy-data" data-target="#{{ form.vars.id }}" data-value="{{ value }}" data-event="change">{{ value }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<button type="button" class="input-group-text dropdown-toggle btn-duration-preset" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
|
||||
<div class="dropdown-menu dropdown-menu-end pre-scrollable">
|
||||
<div class="dropdown-menu-columns">
|
||||
{% for index in [0, 1, 2, 3] %}
|
||||
<div class="dropdown-menu-column" style="min-width: 4rem">
|
||||
{% for value in form.vars.duration_presets %}
|
||||
{% if loop.index0 % 4 == index %}
|
||||
<a class="dropdown-item justify-content-center" href="#" data-form-widget="copy-data" data-target="#{{ form.vars.id }}" data-value="{{ value }}" data-event="change">{{ value }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{% if icon is defined and icon is not empty %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text">
|
||||
{{ icon(icon) }}
|
||||
</div>
|
||||
{{ block('form_widget_simple') }}
|
||||
<div class="input-group-text">
|
||||
{{ icon(icon) }}
|
||||
</div>
|
||||
{{ block('form_widget_simple') }}
|
||||
{% else %}
|
||||
{{ block('form_widget_simple') }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock duration_widget %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user