2024-06-14 15:41:00 +00:00
|
|
|
{% extends 'base.html.twig' %}
|
|
|
|
|
|
|
|
{% block title %}New OrderItem{% endblock %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
<h1>Create new OrderItem</h1>
|
|
|
|
|
|
|
|
{{ include('order_item/_form.html.twig') }}
|
|
|
|
|
2024-06-26 18:12:27 +00:00
|
|
|
<div>
|
|
|
|
<b>click a button to select a given menuitem</b>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
{% for menuItem in menuItems %}
|
|
|
|
<button data-menu-item>{{ menuItem.name }}</button>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<hr />
|
|
|
|
|
2024-06-14 16:48:32 +00:00
|
|
|
<a class="button" href="{{ path('app_food_order_show', { 'id': food_order.id}) }}">back to list</a>
|
2024-06-26 18:12:27 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
document.querySelectorAll('[data-menu-item]').forEach(function(element) {
|
|
|
|
element.addEventListener('click', function(e) {
|
|
|
|
document.getElementById('order_item_name').value = e.target.textContent
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2024-06-14 15:41:00 +00:00
|
|
|
{% endblock %}
|