engelsystem/resources/views/admin/schedule/edit.twig

50 lines
1.6 KiB
Twig
Raw Normal View History

2020-11-21 20:54:04 +01:00
{% extends 'admin/schedule/index.twig' %}
{% import 'macros/base.twig' as m %}
{% import 'macros/form.twig' as f %}
2023-11-03 15:02:54 +01:00
{% block title %}
{{ m.button(m.icon('chevron-left'), url('/admin/schedule'), 'secondary', 'sm') }}
{{ schedule ? __('schedule.edit.title') : __('schedule.import.title') }}
{% endblock %}
2020-11-21 20:54:04 +01:00
{% block row_content %}
{% if schedule and schedule.updated_at %}
<div class="col-md-12">
<p>{{ __('schedule.last_update', [schedule.updated_at.format(__('Y-m-d H:i'))]) }}</p>
</div>
{% endif %}
<form method="post">
{{ csrf() }}
<div class="col-lg-12">
{{ f.input('name', __('schedule.name'), {
'required': true,
'value': schedule ? schedule.name : '',
}) }}
{{ f.input('url', __('schedule.url'), {
'type': 'url',
'required': true,
'value': schedule ? schedule.url : ''
}) }}
2020-11-21 20:54:04 +01:00
{{ f.select('shift_type', __('schedule.shift-type'), shift_types|default([]), {
'selected': schedule ? schedule.shift_type : '',
}) }}
2020-11-21 20:54:04 +01:00
{{ f.input('minutes_before', __('schedule.minutes-before'), {
'type': 'number',
'required': true,
'value': schedule ? schedule.minutes_before : 15
}) }}
{{ f.input('minutes_after', __('schedule.minutes-after'), {
'type': 'number',
'required': true,
'value': schedule ? schedule.minutes_after : 15
}) }}
2020-11-21 20:54:04 +01:00
{{ f.submit(__('form.save')) }}
</div>
</form>
{% endblock %}