diff --git a/api-users.go b/api-users.go index 7adc77d..f30930d 100644 --- a/api-users.go +++ b/api-users.go @@ -310,6 +310,10 @@ func (app *appContext) newUser(req newUserDTO, confirmed bool) (f errorFunc, suc Contact: (req.Email != ""), } + if invite.UserLabel != "" { + emailStore.Label = invite.UserLabel + } + var profile Profile if invite.Profile != "" { app.debug.Printf("Applying settings from profile \"%s\"", invite.Profile) @@ -338,7 +342,7 @@ func (app *appContext) newUser(req newUserDTO, confirmed bool) (f errorFunc, suc } } // if app.config.Section("password_resets").Key("enabled").MustBool(false) { - if req.Email != "" { + if req.Email != "" || invite.UserLabel != "" { app.storage.SetEmailsKey(id, emailStore) } expiry := time.Time{} diff --git a/ts/modules/invites.ts b/ts/modules/invites.ts index 7c4edc0..c7dc04c 100644 --- a/ts/modules/invites.ts +++ b/ts/modules/invites.ts @@ -48,9 +48,11 @@ class DOMInvite implements Invite { if (label) { labelLabel.textContent = window.lang.strings("userLabel"); value.textContent = label; + value.classList.remove("unfocused"); } else { labelLabel.textContent = ""; value.textContent = ""; + value.classList.add("unfocused"); } } @@ -366,7 +368,7 @@ class DOMInvite implements Invite {

${window.lang.strings("inviteDateCreated")}

${window.lang.strings("inviteRemainingUses")}

-

+

`; this._right = document.createElement('div') as HTMLDivElement;