28 lines
1.1 KiB
HTML
28 lines
1.1 KiB
HTML
{{define "page-content"}}
|
|
<h2>Neuer Benutzer</h2>
|
|
<form>
|
|
<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" />
|
|
|
|
<input required name="first-name" placeholder="Vorname" type="text" value="{{.FirstName}}" />
|
|
<input required name="last-name" placeholder="Nachname" type="text" value="{{.LastName}}" />
|
|
|
|
<label for="writer">Schreiber</label>
|
|
<input required id="writer" name="role" type="radio" value="2" {{if eq .Role "2" }}checked{{end}} />
|
|
<label for="editor">Redakteur</label>
|
|
<input required id="editor" name="role" type="radio" value="1" {{if eq .Role "1" }}checked{{end}} />
|
|
<label for="admin">Admin</label>
|
|
<input required id="admin" name="role" type="radio" value="0" {{if eq .Role "0" }}checked{{end}} />
|
|
|
|
<input type="submit" value="Anlegen" hx-post="/add-user/" hx-target="#page-content" />
|
|
</form>
|
|
|
|
<script>
|
|
var msg = "{{.Msg}}";
|
|
if (msg != "") {
|
|
alert(msg);
|
|
}
|
|
</script>
|
|
{{end}}
|