mirror of
https://github.com/sstent/foodplanner.git
synced 2026-02-02 15: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>
|
<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>
|
<input type="number" step="0.1" class="form-control" name="quantity" value="1.0" min="0.1" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<input type="hidden" name="meal_time" id="addSingleFoodMealTime">
|
||||||
<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>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
@@ -477,7 +477,7 @@
|
|||||||
});
|
});
|
||||||
// Show add single food modal and pre-select meal time
|
// Show add single food modal and pre-select meal time
|
||||||
function addSingleFoodToTime(mealTime) {
|
function addSingleFoodToTime(mealTime) {
|
||||||
document.querySelector('#addSingleFoodModal select[name="meal_time"]').value = mealTime;
|
document.getElementById('addSingleFoodMealTime').value = mealTime;
|
||||||
new bootstrap.Modal(document.getElementById('addSingleFoodModal')).show();
|
new bootstrap.Modal(document.getElementById('addSingleFoodModal')).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user