mirror of
				https://github.com/StefBuwalda/cal_counter.git
				synced 2025-10-31 11:49:59 +00:00 
			
		
		
		
	Introduces a new add_meal blueprint with routes and templates for scanning barcodes, adding new food items, and logging meals. Updates FoodItemForm and FoodLogForm validation, changes FoodLog.amount to float, and integrates the new workflow into the daily log UI. Refactors user routes and templates to support the new meal logging process.
		
			
				
	
	
		
			49 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {% extends "base.html" %}
 | |
| 
 | |
| {% block content %}
 | |
| <form method="POST">
 | |
|     {{ form.hidden_tag() }}
 | |
| 
 | |
|     <div class="mb-3">
 | |
|         {{ form.barcode.label(class="form-label") }}
 | |
|         {{ form.barcode(class="form-control-plaintext", readonly=true) }}
 | |
|     </div>
 | |
| 
 | |
|     <div class="mb-3">
 | |
|         {{ form.name.label(class="form-label") }}
 | |
|         {{ form.name(class="form-control") }}
 | |
|     </div>
 | |
| 
 | |
|     <div class="mb-3">
 | |
|         {{ form.energy.label(class="form-label") }}
 | |
|         {{ form.energy(class="form-control") }}
 | |
|     </div>
 | |
| 
 | |
|     <div class="mb-3">
 | |
|         {{ form.protein.label(class="form-label") }}
 | |
|         {{ form.protein(class="form-control") }}
 | |
|     </div>
 | |
| 
 | |
|     <div class="mb-3">
 | |
|         {{ form.carbs.label(class="form-label") }}
 | |
|         {{ form.carbs(class="form-control") }}
 | |
|     </div>
 | |
| 
 | |
|     <div class="mb-3">
 | |
|         {{ form.sugar.label(class="form-label") }}
 | |
|         {{ form.sugar(class="form-control") }}
 | |
|     </div>
 | |
| 
 | |
|     <div class="mb-3">
 | |
|         {{ form.fat.label(class="form-label") }}
 | |
|         {{ form.fat(class="form-control") }}
 | |
|     </div>
 | |
| 
 | |
|     <div class="mb-3">
 | |
|         {{ form.saturated_fat.label(class="form-label") }}
 | |
|         {{ form.saturated_fat(class="form-control") }}
 | |
|     </div>
 | |
| 
 | |
|     {{ form.submit(class="btn btn-primary") }}
 | |
| </form>
 | |
| {% endblock%} |