nagasurendra commited on
Commit
8558df4
·
verified ·
1 Parent(s): 3867ca6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -29
app.py CHANGED
@@ -112,37 +112,37 @@ def filter_menu(preference):
112
 
113
  return html_content
114
  def create_modal_window():
115
- add_ons = load_add_ons_from_salesforce()
116
- add_ons_html = ""
117
- for add_on in add_ons:
118
- add_ons_html += f"""
119
- <label>
120
- <input type="checkbox" name="biryani-extra" value="{add_on['Name']}" data-price="{add_on['Price__c']}" />
121
- {add_on['Name']} + ${add_on['Price__c']}
122
- </label>
123
- <br>
124
- """
125
 
126
- modal_html = f"""
127
- <div id="modal" style="display: none; position: fixed; background: white; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); padding: 20px; z-index: 1000;">
128
- <div style="text-align: right;">
129
- <button onclick="closeModal()" style="background: none; border: none; font-size: 18px; cursor: pointer;">&times;</button>
130
- </div>
131
- <img id="modal-image" style="width: 100%; height: 300px; border-radius: 8px; margin-bottom: 20px;" />
132
- <h2 id="modal-name"></h2>
133
- <p id="modal-description"></p>
134
- <p id="modal-price"></p>
135
- <label for="biryani-extras"><strong>Add-ons :</strong></label>
136
- <div id="biryani-extras-options" style="display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0;">
137
- {add_ons_html}
 
 
 
 
 
138
  </div>
139
- <label for="quantity">Quantity:</label>
140
- <input type="number" id="quantity" value="1" min="1" style="width: 50px;" />
141
- <textarea id="special-instructions" placeholder="Add your special instructions here..." style="width: 100%; height: 60px;"></textarea>
142
- <button style="background-color: #28a745; color: white; border: none; padding: 10px 20px; font-size: 14px; border-radius: 5px; cursor: pointer;" onclick="addToCart()">Add to Cart</button>
143
- </div>
144
- """
145
- return modal_html
146
 
147
  # JavaScript for Modal and Cart
148
  def modal_js():
 
112
 
113
  return html_content
114
  def create_modal_window():
115
+ add_ons = load_add_ons_from_salesforce()
116
+ add_ons_html = ""
117
+ for add_on in add_ons:
118
+ add_ons_html += f"""
119
+ <label>
120
+ <input type="checkbox" name="biryani-extra" value="{add_on['Name']}" data-price="{add_on['Price__c']}" />
121
+ {add_on['Name']} + ${add_on['Price__c']}
122
+ </label>
123
+ <br>
124
+ """
125
 
126
+ modal_html = f"""
127
+ <div id="modal" style="display: none; position: fixed; background: white; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); padding: 20px; z-index: 1000;">
128
+ <div style="text-align: right;">
129
+ <button onclick="closeModal()" style="background: none; border: none; font-size: 18px; cursor: pointer;">&times;</button>
130
+ </div>
131
+ <img id="modal-image" style="width: 100%; height: 300px; border-radius: 8px; margin-bottom: 20px;" />
132
+ <h2 id="modal-name"></h2>
133
+ <p id="modal-description"></p>
134
+ <p id="modal-price"></p>
135
+ <label for="biryani-extras"><strong>Add-ons :</strong></label>
136
+ <div id="biryani-extras-options" style="display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0;">
137
+ {add_ons_html}
138
+ </div>
139
+ <label for="quantity">Quantity:</label>
140
+ <input type="number" id="quantity" value="1" min="1" style="width: 50px;" />
141
+ <textarea id="special-instructions" placeholder="Add your special instructions here..." style="width: 100%; height: 60px;"></textarea>
142
+ <button style="background-color: #28a745; color: white; border: none; padding: 10px 20px; font-size: 14px; border-radius: 5px; cursor: pointer;" onclick="addToCart()">Add to Cart</button>
143
  </div>
144
+ """
145
+ return modal_html
 
 
 
 
 
146
 
147
  # JavaScript for Modal and Cart
148
  def modal_js():