2.1 - Better form understanding

This commit is contained in:
Evann Regnault 2025-03-15 02:01:51 +01:00
parent dab97b2de6
commit b6f662fa2c
3 changed files with 9 additions and 9 deletions

View file

@ -7,11 +7,11 @@ templ Login() {
<div hx-trigger="changed" id="loginError"></div>
<div class="mb-3">
<label for="email" class="form-label">Email Address</label>
<input name="email" class="form-control" type="email" id="email" required>
<input name="email" class="form-control" type="email" id="email" placeholder="Email" required>
</div>
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<input name="password" class="form-control" type="password" id="password" required>
<input name="password" class="form-control" type="password" id="password" placeholder="Password" required>
</div>
<button class="btn btn-primary" type="submit">Connect</button>
</form>

View file

@ -45,11 +45,11 @@ templ EditProject(project store.Project) {
<h3>Project Edition</h3>
<div class="mb-2">
<label class="form-label" for="projectName">Project Name</label>
<input class="form-control" name="name" id="projectName" value={project.ProjectName}>
<input class="form-control" name="name" id="projectName" placeholder="Project Name" value={project.ProjectName}>
</div>
<div class="mb-2">
<label class="form-label" for="projectToken">Project Token</label>
<input class="form-control" name="token" id="projectToken" value={project.Token} type="password">
<input class="form-control" name="token" id="projectToken" placeholder="Project Token" value={project.Token} type="password">
</div>
<button class="btn btn-primary">Submit</button>
</form>
@ -94,7 +94,7 @@ templ BadgeMaker(project store.Project) {
<label class="form-label" for="imageURL">Image URL</label>
<div class="mb-2" id="image" hx-trigger="load" hx-get={fmt.Sprintf("/project/badge/%d/alert_status", project.ID)}>
</div>
<input class="form-control disabled" id="imageURL" readonly>
<input class="form-control" id="imageURL" disabled readonly>
</div>
</div>

View file

@ -8,23 +8,23 @@ templ User(user store.User) {
<div class="mb-4">
<form id="nameForm" hx-post="/api/user/username">
<label for="name" class="form-label">Username</label>
<input id="name" class="form-control" name="username" value={user.Username}>
<input id="name" placeholder="Username" class="form-control" name="username" value={user.Username}>
<button class="btn btn-primary mt-2">Change Username</button>
</form>
</div>
<div class="mb-4">
<form id="emailForm" hx-post="/api/user/email">
<label for="email" class="form-label">Email</label>
<input id="email" class="form-control" name="email" value={user.Email}>
<input id="email" class="form-control" name="email" placeholder="Email" value={user.Email}>
<button class="btn btn-primary mt-2">Change Email</button>
</form>
</div>
<div class="mb-4">
<form id="passwordForm" hx-post="/api/user/password">
<label for="password" class="form-label">Password</label>
<input id="password" class="form-control" name="password" type="password" value>
<input id="password" class="form-control" placeholder="Password" name="password" type="password" value>
<label for="verifyPassword" class="form-label">Verify Password</label>
<input id="verifyPassword" class="form-control" name="verify_password" type="password" value>
<input id="verifyPassword" class="form-control" placeholder="Repeat Password" name="verify_password" type="password" value>
<button class="btn btn-primary mt-2">Change Password</button>
</form>
</div>