This commit is contained in:
lubiana 2025-06-18 20:12:17 +02:00
parent c99032044d
commit 5cb66c5012
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
34 changed files with 1236 additions and 132 deletions

View file

@ -1,4 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_start(form, {'attr': {'class': 'mb-3'}}) }}
{{ form_widget(form, {'attr': {'class': 'form-control'}}) }}
<button class="btn btn-primary mt-2">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View file

@ -3,9 +3,11 @@
{% block title %}Edit OrderItem{% endblock %}
{% block body %}
<h1>Edit OrderItem</h1>
<h1 class="mb-4">Edit OrderItem</h1>
{{ include('order_item/_form.html.twig', {'button_label': 'Update'}) }}
<div class="mb-4">
{{ include('order_item/_form.html.twig', {'button_label': 'Update'}) }}
</div>
<a href="{{ path('app_food_order_show', {'id': order_item.foodOrder.id}) }}">back to list</a>
<a class="btn btn-secondary" href="{{ path('app_food_order_show', {'id': order_item.foodOrder.id}) }}">back to list</a>
{% endblock %}

View file

@ -3,30 +3,32 @@
{% block title %}New OrderItem{% endblock %}
{% block body %}
<h1>Create new OrderItem</h1>
<h1 class="mb-4">Create new OrderItem</h1>
{{ include('order_item/_form.html.twig') }}
<div class="mb-4">
{{ include('order_item/_form.html.twig') }}
</div>
<hr />
{% if food_order.foodVendor.menuLink != '' %}
<a href="{{ food_order.foodVendor.menuLink }}" target="_blank">
<a class="btn btn-outline-secondary mb-3" href="{{ food_order.foodVendor.menuLink }}" target="_blank">
External link to Menu
</a>
{% endif %}
<div>
<div class="mb-2">
<b>click a button to select a given menuitem</b>
</div>
<div>
<div class="mb-3 d-flex flex-wrap gap-2">
{% for menuItem in menuItems %}
<a href="#" data-menu-item>{{ menuItem.name }}</a>
<a class="btn btn-outline-info btn-sm" href="#" data-menu-item>{{ menuItem.name }}</a>
{% endfor %}
</div>
<hr />
<a class="button" href="{{ path('app_food_order_show', { 'id': food_order.id}) }}">back to list</a>
<a class="btn btn-secondary" href="{{ path('app_food_order_show', { 'id': food_order.id}) }}">back to list</a>
<script>
document.querySelectorAll('[data-menu-item]').forEach(function(element) {