cpolis/web/templates/add-user.html

28 lines
1.1 KiB
HTML
Raw Normal View History

2024-02-24 10:28:12 +01:00
{{define "page-content"}}
<h2>Neuer Benutzer</h2>
2024-02-24 10:28:12 +01:00
<form>
2024-03-01 12:25:53 +01:00
<input required name="username" placeholder="Benutzername" type="text" value="{{.UserName}}" />
<input required name="password" placeholder="Passwort" type="password" />
<input required name="password2" placeholder="Passwort wiederholen" type="password" />
2024-02-24 10:28:12 +01:00
2024-03-01 12:25:53 +01:00
<input required name="first-name" placeholder="Vorname" type="text" value="{{.FirstName}}" />
<input required name="last-name" placeholder="Nachname" type="text" value="{{.LastName}}" />
2024-02-24 10:28:12 +01:00
<label for="writer">Schreiber</label>
2024-03-01 12:25:53 +01:00
<input required id="writer" name="role" type="radio" value="2" {{if eq .Role "2" }}checked{{end}} />
2024-02-24 10:28:12 +01:00
<label for="editor">Redakteur</label>
2024-03-01 12:25:53 +01:00
<input required id="editor" name="role" type="radio" value="1" {{if eq .Role "1" }}checked{{end}} />
2024-02-24 10:28:12 +01:00
<label for="admin">Admin</label>
2024-03-01 12:25:53 +01:00
<input required id="admin" name="role" type="radio" value="0" {{if eq .Role "0" }}checked{{end}} />
2024-02-24 10:28:12 +01:00
<input type="submit" value="Anlegen" hx-post="/add-user/" hx-target="#page-content" />
</form>
<script>
var msg = "{{.Msg}}";
if (msg != "") {
alert(msg);
}
</script>
2024-02-24 10:28:12 +01:00
{{end}}