mirror of
https://github.com/StefBuwalda/cal_counter.git
synced 2025-10-29 19:00:00 +00:00
Add meal v2 flow and user timezone support
Introduces a new add_meal_v2 blueprint with barcode scanning, item search, and improved meal logging UI. Adds user timezone support: login form now captures timezone, User model and database schema updated, and timezone is set on login. Refactors templates and forms to support these changes, and removes the old login template.
This commit is contained in:
7
forms.py
7
forms.py
@@ -4,13 +4,20 @@ from wtforms import (
|
||||
PasswordField,
|
||||
SubmitField,
|
||||
FloatField,
|
||||
HiddenField,
|
||||
)
|
||||
from wtforms.validators import DataRequired, InputRequired, Optional
|
||||
|
||||
|
||||
class SelectDateForm(FlaskForm):
|
||||
date = HiddenField(validators=[DataRequired()])
|
||||
submit = SubmitField("+ Add Item")
|
||||
|
||||
|
||||
class LoginForm(FlaskForm):
|
||||
username = StringField("Username", validators=[DataRequired()])
|
||||
password = PasswordField("Password", validators=[DataRequired()])
|
||||
timezone = HiddenField("Timezone", validators=[DataRequired()])
|
||||
submit = SubmitField("Log in")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user