lokesh341 commited on
Commit
9e2fb5a
·
verified ·
1 Parent(s): 6ffada7

Update templates/menu.html

Browse files
Files changed (1) hide show
  1. templates/menu.html +32 -6
templates/menu.html CHANGED
@@ -236,6 +236,33 @@
236
  left: 4px;
237
  color: white;
238
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  .addon-section .form-check-label {
240
  font-size: 16px;
241
  margin-left: 5px;
@@ -578,7 +605,7 @@
578
  const optionId = `addon-spice-level-${option}`;
579
  const optionHTML = `
580
  <div class="form-check">
581
- <input type="checkbox" class="form-check-input" id="${optionId}" value="${option}" data-name="${option}" data-group="Spice Level">
582
  <label class="form-check-label" for="${optionId}">
583
  ${option}
584
  </label>
@@ -752,12 +779,11 @@
752
  name: option.getAttribute('data-name') || 'Default Type',
753
  price: 0
754
  }));
755
- const spiceLevelOptions = Array.from(
756
- document.querySelectorAll('#spice-level-options input[type="checkbox"]:checked')
757
- ).map(option => ({
758
- name: option.getAttribute('data-name') || 'Default Spice Level',
759
  price: 0
760
- }));
761
  selectedAddOns = [...selectedAddOns, ...prepStyleOptions, ...typeOptions, ...spiceLevelOptions];
762
  }
763
 
 
236
  left: 4px;
237
  color: white;
238
  }
239
+ .addon-section .form-check-input[type="radio"] {
240
+ -webkit-appearance: none;
241
+ -moz-appearance: none;
242
+ appearance: none;
243
+ width: 20px;
244
+ height: 20px;
245
+ border: 2px solid #343a40;
246
+ border-radius: 50%;
247
+ background-color: #f0f0f0;
248
+ position: relative;
249
+ margin-right: 10px;
250
+ }
251
+ .addon-section .form-check-input[type="radio"]:checked {
252
+ background-color: #006400;
253
+ border-color: #006400;
254
+ }
255
+ .addon-section .form-check-input[type="radio"]:checked::before {
256
+ content: '';
257
+ position: absolute;
258
+ top: 50%;
259
+ left: 50%;
260
+ transform: translate(-50%, -50%);
261
+ width: 10px;
262
+ height: 10px;
263
+ background-color: white;
264
+ border-radius: 50%;
265
+ }
266
  .addon-section .form-check-label {
267
  font-size: 16px;
268
  margin-left: 5px;
 
605
  const optionId = `addon-spice-level-${option}`;
606
  const optionHTML = `
607
  <div class="form-check">
608
+ <input type="radio" class="form-check-input" name="spice-level" id="${optionId}" value="${option}" data-name="${option}" data-group="Spice Level">
609
  <label class="form-check-label" for="${optionId}">
610
  ${option}
611
  </label>
 
779
  name: option.getAttribute('data-name') || 'Default Type',
780
  price: 0
781
  }));
782
+ const spiceLevelOption = document.querySelector('#spice-level-options input[type="radio"][name="spice-level"]:checked');
783
+ const spiceLevelOptions = spiceLevelOption ? [{
784
+ name: spiceLevelOption.getAttribute('data-name') || 'Default Spice Level',
 
785
  price: 0
786
+ }] : [];
787
  selectedAddOns = [...selectedAddOns, ...prepStyleOptions, ...typeOptions, ...spiceLevelOptions];
788
  }
789