feat: Starting users view controller.

This commit is contained in:
2025-01-08 08:02:29 -05:00
parent e86e5facc6
commit 3557227430
5 changed files with 83 additions and 30 deletions

View File

@@ -6,20 +6,7 @@
#extend("logo")
</div>
</header>
<form class="login-form"
hx-post="#(route)"
hx-target="body"
hx-push-url="true"
>
<label for="username">Username</label>
<input type="text" id="username" placeholder="Username" name="username" autocomplete="username" required autofocus>
<br>
<label for="password">Password</label>
<input type="password" id="password" placeholder="Password" name="password" autocomplete="current-password" required>
<br>
<input type="submit" value="Sign In">
</form>
#extend("user-form")
</div>
#endexport
#endextend

View File

@@ -0,0 +1,37 @@
<form class="user-form"
id="user-form"
hx-post="#(htmxTargetUrl)"
hx-target="#(htmxTarget)"
hx-push-url="#(htmxPushUrl)"
>
<label for="username">Username</label>
<input type="text"
id="username"
name="username"
placeholder="Username"
autofocus
required
>
<br>
<label for="password">Password</label>
<input type="password"
id="password"
name="password"
placeholder="Password"
autofocus
required
>
<br>
#if(showConfirmPassword):
<label for="confirmPassword">Password</label>
<input type="password"
id="confirmPassword"
name="confirmPassword"
placeholder="Confirm Password"
autofocus
required
>
<br>
#endif
<input type="submit" value="#(buttonLabel)">
</form>