0
0
Fork 0
mirror of https://github.com/kevinpapst/kimai2.git synced 2025-01-10 19:47:35 +00:00
kevinpapst_kimai2/templates/default/_form.html.twig
2024-12-22 22:50:42 +01:00

42 lines
No EOL
1.7 KiB
Twig

{% if form_theme is defined %}
{% form_theme form form_theme %}
{% endif %}
{% set _back = back is defined and back is not same as (false) ? back : false %}
{% set _reset = reset is defined and reset is same as (false) ? false : true %}
<div class="card mb-3">
{% block form_before %}{% endblock %}
{{ form_start(form, formStartOptions|default({})) }}
<div class="card-header">
<h3 class="card-title">
{{ title }}
{% if form.vars.docu_chapter is defined and form.vars.docu_chapter is not empty %}
<a class="form-help" href="{{ form.vars.docu_chapter|docu_link }}" target="_blank">?</a>
{% endif %}
</h3>
</div>
<div class="card-body">
{% block form_body_outer %}
{% block form_body_pre %}
{{ form_errors(form) }}
{% endblock %}
{% block form_body %}
{{ form_rest(form) }}
{% endblock %}
{% block form_body_post %}
{% endblock %}
{% endblock %}
</div>
<div class="card-footer">
{% block submit_button %}
<input type="submit" data-loading-text="{{ (submit_button|default('action.save'))|trans }}…" value="{{ (submit_button|default('action.save'))|trans }}" class="btn btn-primary" />
{% endblock %}
{% if _back is not same as (false) %}
<a href="{{ _back }}" class="btn btn-link">{{ 'back'|trans }}</a>
{% endif %}
{% if _reset is not same as (false) %}
<input type="reset" value="{{ 'action.reset'|trans }}" class="btn btn-link pull-right" />
{% endif %}
</div>
{{ form_end(form) }}
{% block form_after %}{% endblock %}
</div>