saufen/templates/drink-types/edit.twig
2025-05-31 21:43:13 +02:00

36 lines
No EOL
1.3 KiB
Twig

{% extends 'layout.twig' %}
{% import 'components/form.twig' as form %}
{% block title %}Edit Drink Type - {{ parent() }}{% endblock %}
{% block content %}
<div class="row mb-4">
<div class="col">
<h2>Edit Drink Type</h2>
</div>
<div class="col-auto">
<a href="/drink-types" class="btn btn-secondary">
<i class="fas fa-arrow-left"></i> Back to List
</a>
</div>
</div>
<div class="card">
<div class="card-body">
{{ form.errors(error) }}
<form action="/drink-types/{{ drinkType.id }}" method="post">
{{ form.input('name', 'Name', drinkType.name, 'text', true) }}
{{ form.textarea('description', 'Description', drinkType.description, false, 3, 'Enter a description of the drink type') }}
{{ form.input('desired_stock', 'Desired Stock', drinkType.desiredStock, 'number', true, '', 'form-control-sm') }}
<div class="form-group mt-4">
{{ form.submit('Update Drink Type') }}
<a href="/drink-types/{{ drinkType.id }}" class="btn btn-link">Cancel</a>
</div>
</form>
</div>
</div>
{% endblock %}