!20 add username to order and item
This commit is contained in:
parent
9d81464fd8
commit
511f12f10f
12 changed files with 147 additions and 24 deletions
|
@ -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
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue