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

52 lines
1.7 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 %}
{% block title %}{{ schedule ? __('schedule.edit.title') : __('schedule.import.title') }}{% endblock %}
2023-12-06 19:03:12 +01:00
{% block content_title %}
2023-11-03 15:02:54 +01:00
{{ m.button(m.icon('chevron-left'), url('/admin/schedule'), 'secondary', 'sm') }}
2023-12-06 19:03:12 +01:00
{{ block('title') }}
2023-11-03 15:02:54 +01:00
{% endblock %}
2020-11-21 20:54:04 +01:00
{% block row_content %}
{% if schedule and schedule.updated_at %}
<div class="col-md-12">
2023-11-23 14:30:46 +01:00
<p>{{ __('schedule.last_update', [schedule.updated_at.format(__('general.datetime'))]) }}</p>
2020-11-21 20:54:04 +01:00
</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 %}