Fix role notes on new user form, reset on submit

This commit is contained in:
Christoph Kluge 2023-04-11 17:27:33 +02:00
parent 753ced2787
commit 33ed07a35a

View File

@ -20,6 +20,7 @@
let text = await res.text() let text = await res.text()
popMessage(text, '#048109') popMessage(text, '#048109')
reloadUserList() reloadUserList()
form.reset()
} else { } else {
let text = await res.text() let text = await res.text()
// console.log(res.statusText) // console.log(res.statusText)
@ -79,7 +80,12 @@
{#if i == 0} {#if i == 0}
<div> <div>
<input type="radio" id={role} name="role" value={role} checked/> <input type="radio" id={role} name="role" value={role} checked/>
<label for={role}>{role.charAt(0).toUpperCase() + role.slice(1)} (regular user, same as if created via LDAP sync.)</label> <label for={role}>{role.toUpperCase()} (Allowed to interact with REST API.)</label>
</div>
{:else if i == 1}
<div>
<input type="radio" id={role} name="role" value={role} checked/>
<label for={role}>{role.charAt(0).toUpperCase() + role.slice(1)} (Same as if created via LDAP sync.)</label>
</div> </div>
{:else} {:else}
<div> <div>