Skip to content

Commit

Permalink
Merge pull request #147 from martius-lab/fkloss/formhints
Browse files Browse the repository at this point in the history
Notes on username and password in registration form
  • Loading branch information
luator authored Jan 15, 2025
2 parents 2816e7a + 129e2f2 commit d225eda
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ def input_100w(name, **props) -> rx.Component:
Returns:
A reflex component.
"""
if "placeholder" not in props:
props["placeholder"] = name.replace("_", " ").title()

return rx.input(
placeholder=name.replace("_", " ").title(),
id=name,
name=name,
width="100%",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@ def register_form() -> rx.Component:
rx.heading("Create an account", size="7"),
register_error(),
rx.text("Registration Key"),
input_100w("key"),
rx.text("Username"),
input_100w("username"),
rx.text("Password"),
input_100w("password", type="password"),
input_100w("key", placeholder="The key you got in the lecture"),
rx.text(
"Username (please use the pattern 'teamname-algorithm',"
" e.g. 'team1-ppo')"
),
input_100w("username", placeholder="teamname-algorithm"),
rx.text("Password (Note: Password cannot be changed or recovered later)"),
input_100w(
"password", type="password", placeholder="Password (min. 8 chars)"
),
rx.text("Repeat Password"),
input_100w("confirm_password", type="password"),
rx.button("Sign up", width="100%"),
Expand Down

0 comments on commit d225eda

Please sign in to comment.