frontend: Add user to global scope and make principal inputs dropdowns for collection creation

This commit is contained in:
Lennart
2025-07-05 10:04:42 +02:00
parent d8803a38a2
commit 4134ab0520
8 changed files with 40 additions and 7 deletions

View File

@@ -35,7 +35,12 @@ let CreateAddressbookForm = class extends i {
<form @submit=${this.submit} ${n(this.form)}>
<label>
principal (for group addressbooks)
<input type="text" name="principal" value=${this.user} @change=${(e2) => this.principal = e2.target.value} />
<select name="principal" value=${this.user} @change=${(e2) => this.principal = e2.target.value}>
<option value=${this.user}>${this.user}</option>
${window.rusticalUser.memberships.map((membership) => x`
<option value=${membership}>${membership}</option>
`)}
</select>
</label>
<br>
<label>