cpolis/web/templates/edit-user.html

68 lines
2.4 KiB
HTML
Raw Normal View History

2024-03-11 21:08:27 +01:00
{{define "page-content"}}
2024-04-09 19:06:29 +02:00
<h2>Profil von {{.FirstName}} {{.LastName}} bearbeiten</h2>
2024-04-07 18:57:03 +02:00
2024-03-11 21:08:27 +01:00
<form>
2024-09-09 22:03:31 +02:00
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
2024-04-01 14:22:59 +02:00
<div>
<label for="username">Benutzername</label>
<input class="w-full" name="username" type="text" value="{{.UserName}}" />
</div>
2024-04-09 19:06:29 +02:00
2024-04-01 14:22:59 +02:00
<div>
<label for="first-name">Vorname</label>
<input class="w-full" name="first-name" type="text" value="{{.FirstName}}" />
</div>
2024-04-09 19:06:29 +02:00
2024-04-01 14:22:59 +02:00
<div>
<label for="last-name">Nachname</label>
<input class="w-full" name="last-name" type="text" value="{{.LastName}}" />
</div>
2024-04-09 19:06:29 +02:00
2024-04-01 14:22:59 +02:00
<div>
<label for="password">Passwort</label>
<input class="w-full" name="password" placeholder="***" type="password" />
</div>
2024-04-09 19:06:29 +02:00
2024-04-01 14:22:59 +02:00
<div>
<label for="password2">Passwort wiederholen</label>
<input class="w-full" name="password2" placeholder="***" type="password" />
</div>
2024-10-27 14:43:38 +01:00
<div>
<label for="email">Emailadresse</label>
<input class="w-full" required name="email" type="text" value="{{.Email}}" />
</div>
<div>
<label for="email2">Emailadresse wiederholen</label>
<input class="w-full" required name="email2" type="text" value="{{.Email}}" />
</div>
2024-03-28 08:41:38 +01:00
</div>
2024-03-11 21:08:27 +01:00
2024-09-09 22:03:31 +02:00
<div class="flex flex-wrap gap-4">
2024-04-09 19:06:29 +02:00
<div>
<input required id="author" name="role" type="radio" value="3" {{if eq .Role 3 }}checked{{end}} />
<label for="author">Autor</label>
</div>
<div>
<input required id="editor" name="role" type="radio" value="2" {{if eq .Role 2 }}checked{{end}} />
<label for="editor">Redakteur</label>
</div>
<div>
<input required id="publisher" name="role" type="radio" value="1" {{if eq .Role 1 }}checked{{end}} />
<label for="publisher">Herausgeber</label>
</div>
<div>
<input required id="admin" name="role" type="radio" value="0" {{if eq .Role 0 }}checked{{end}} />
2024-04-12 08:46:34 +02:00
<label for="admin">Administrator</label>
2024-04-09 19:06:29 +02:00
</div>
</div>
2024-04-01 14:22:59 +02:00
<div class="btn-area">
2024-08-30 15:42:53 +02:00
<input class="action-btn" type="submit" value="Aktualisieren" hx-post="/user/update/{{.ID}}"
2024-04-01 14:22:59 +02:00
hx-target="#page-content" />
<button class="btn" hx-get="/hub" hx-target="#page-content">Abbrechen</button>
2024-03-28 08:41:38 +01:00
</div>
2024-03-11 21:08:27 +01:00
</form>
{{end}}