mirror of
https://github.com/sstent/foodplanner.git
synced 2026-01-25 11:11:36 +00:00
updated the tracker to have more features
This commit is contained in:
@@ -23,14 +23,7 @@
|
||||
<label class="form-label">Quantity (g)</label>
|
||||
<input type="number" step="0.1" class="form-control" name="quantity" value="1.0" min="0.1" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Meal Time</label>
|
||||
<select class="form-control" name="meal_time" required>
|
||||
{% for meal_time in meal_times %}
|
||||
<option value="{{ meal_time }}">{{ meal_time }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" name="meal_time" id="addSingleFoodMealTime">
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -477,7 +477,7 @@
|
||||
});
|
||||
// Show add single food modal and pre-select meal time
|
||||
function addSingleFoodToTime(mealTime) {
|
||||
document.querySelector('#addSingleFoodModal select[name="meal_time"]').value = mealTime;
|
||||
document.getElementById('addSingleFoodMealTime').value = mealTime;
|
||||
new bootstrap.Modal(document.getElementById('addSingleFoodModal')).show();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user