Skip to content

Commit

Permalink
added submit on enter for sign-in/up pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasByr committed Oct 13, 2023
1 parent 134824c commit 5d16fa3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/app/widgets/signin_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ def build(self):
size=30,
)

self.text_user = ft.TextField(label="User Name")
self.text_user = ft.TextField(label="User Name", on_submit=self.btn_signin)
self.text_password = ft.TextField(
label="Password", password=True, can_reveal_password=True
label="Password",
password=True,
can_reveal_password=True,
on_submit=self.btn_signin,
)
self.text_signin = ft.ElevatedButton(
text="Sign in",
Expand Down
7 changes: 5 additions & 2 deletions src/app/widgets/signup_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ def build(self):
text_align=ft.TextAlign.CENTER,
size=30,
)
self.text_user = ft.TextField(label="User Name")
self.text_user = ft.TextField(label="User Name", on_submit=self.btn_signup)
self.text_password = ft.TextField(
label="Password", password=True, can_reveal_password=True
label="Password",
password=True,
can_reveal_password=True,
on_submit=self.btn_signup,
)
self.text_signup = ft.ElevatedButton(
text="Sign up",
Expand Down

0 comments on commit 5d16fa3

Please sign in to comment.