saufen/templates/drink-types/create.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 %}Add New Drink Type - {{ parent() }}{% endblock %}
{% block content %}
<div class="row mb-4">
<div class="col">
<h2>Add New 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" method="post">
{{ form.input('name', 'Name', data.name|default(''), 'text', true) }}
{{ form.textarea('description', 'Description', data.description|default(''), false, 3, 'Enter a description of the drink type') }}
{{ form.input('desired_stock', 'Desired Stock', data.desired_stock|default('10'), 'number', true, '', 'form-control-sm') }}
<div class="form-group mt-4">
{{ form.submit('Create Drink Type') }}
<a href="/drink-types" class="btn btn-link">Cancel</a>
</div>
</form>
</div>
</div>
{% endblock %}