!20 add username to order and item

This commit is contained in:
lubiana 2024-06-27 23:33:32 +02:00
parent 9d81464fd8
commit 511f12f10f
No known key found for this signature in database
12 changed files with 147 additions and 24 deletions

View file

@ -12,7 +12,7 @@
</div>
<div>
{% for menuItem in menuItems %}
<button data-menu-item>{{ menuItem.name }}</button>
<a href="#" data-menu-item>{{ menuItem.name }}</a>
{% endfor %}
</div>
@ -23,6 +23,7 @@
<script>
document.querySelectorAll('[data-menu-item]').forEach(function(element) {
element.addEventListener('click', function(e) {
e.preventDefault();
document.getElementById('order_item_name').value = e.target.textContent
});
});