Spaces:
Sleeping
Sleeping
Update templates/menu.html
Browse files- templates/menu.html +6 -0
templates/menu.html
CHANGED
|
@@ -529,10 +529,15 @@ form.text-center.mb-4 {
|
|
| 529 |
document.getElementById('modal-description').innerText = description || 'No description available.';
|
| 530 |
document.getElementById('addons-list').innerHTML = 'Loading customization options...';
|
| 531 |
document.getElementById('modal-instructions').value = '';
|
|
|
|
| 532 |
// Set section and category for reference
|
| 533 |
const modalSectionEl = document.getElementById('modal-section');
|
| 534 |
modalSectionEl.setAttribute('data-section', section);
|
| 535 |
modalSectionEl.setAttribute('data-category', selectedCategory);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 536 |
// Fetch customization options based on the section
|
| 537 |
fetch(`/api/addons?item_name=${encodeURIComponent(name)}&item_section=${encodeURIComponent(section)}`)
|
| 538 |
.then(response => response.json())
|
|
@@ -548,6 +553,7 @@ form.text-center.mb-4 {
|
|
| 548 |
data.addons.forEach(addon => {
|
| 549 |
const sectionDiv = document.createElement('div');
|
| 550 |
sectionDiv.classList.add('addon-section'); // Add styling class
|
|
|
|
| 551 |
// Add section title
|
| 552 |
const title = document.createElement('h6');
|
| 553 |
title.innerText = addon.name;
|
|
|
|
| 529 |
document.getElementById('modal-description').innerText = description || 'No description available.';
|
| 530 |
document.getElementById('addons-list').innerHTML = 'Loading customization options...';
|
| 531 |
document.getElementById('modal-instructions').value = '';
|
| 532 |
+
|
| 533 |
// Set section and category for reference
|
| 534 |
const modalSectionEl = document.getElementById('modal-section');
|
| 535 |
modalSectionEl.setAttribute('data-section', section);
|
| 536 |
modalSectionEl.setAttribute('data-category', selectedCategory);
|
| 537 |
+
|
| 538 |
+
// Set the default quantity to 1
|
| 539 |
+
document.getElementById('quantityInput').value = 1;
|
| 540 |
+
|
| 541 |
// Fetch customization options based on the section
|
| 542 |
fetch(`/api/addons?item_name=${encodeURIComponent(name)}&item_section=${encodeURIComponent(section)}`)
|
| 543 |
.then(response => response.json())
|
|
|
|
| 553 |
data.addons.forEach(addon => {
|
| 554 |
const sectionDiv = document.createElement('div');
|
| 555 |
sectionDiv.classList.add('addon-section'); // Add styling class
|
| 556 |
+
|
| 557 |
// Add section title
|
| 558 |
const title = document.createElement('h6');
|
| 559 |
title.innerText = addon.name;
|