Phase 10, part 4: inviting users, and what admins can change
Settings → Users lists everyone with their access and status. Admins invite people by email (a link for 7 days), as admins or as members with modules each to view or edit; the invitation's page sets the password, profile and emails wanted. Admins can resend or withdraw invitations, change access, turn accounts off and on, unlock, reset two-factor, sign someone out, and remove them; never the owner, nor themselves. Your account gets the emails wanted and a photo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,9 +12,28 @@
|
||||
<label>Time zone <input name="time_zone" value="{{.U.TimeZone}}" list="zones" placeholder="e.g. Europe/Paris">
|
||||
<span class="help">Times are shown in it. Empty: the server's.</span></label>
|
||||
<datalist id="zones">{{range .Zones}}<option value="{{.}}">{{end}}</datalist>
|
||||
{{if .Emails}}<fieldset>
|
||||
<legend>Emails you'd like</legend>
|
||||
{{$u := .U}}{{range .Emails}}<label class="check"><input type="checkbox" name="emails" value="{{.ID}}" {{if has $u.Emails .ID}}checked{{end}}> <span>{{.Name}} <span class="help">{{.Help}}</span></span></label>{{end}}
|
||||
</fieldset>{{end}}
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
|
||||
{{if .Photos}}
|
||||
<section class="card" id="photo">
|
||||
<h2>Photo</h2>
|
||||
<div class="photo-row">
|
||||
{{if .U.Photo}}<img class="avatar large" src="/users/{{.U.ID}}/photo" alt="Your photo" width="64" height="64">{{else}}<span class="avatar large none" aria-hidden="true">{{slice .U.Email 0 1}}</span>{{end}}
|
||||
<form method="post" action="/settings/account/photo" enctype="multipart/form-data" class="inline-form">
|
||||
<input type="file" name="photo" accept="image/png,image/jpeg,image/webp,image/gif" required>
|
||||
<button type="submit" class="secondary">Upload</button>
|
||||
</form>
|
||||
{{if .U.Photo}}<form method="post" action="/settings/account/photo?remove=1"><button type="submit" class="secondary small">Remove</button></form>{{end}}
|
||||
</div>
|
||||
<p class="help">Shown beside your name to the team. A square picture of 2 MB or less.</p>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
<form class="card" method="post" action="/settings/account/password" id="password">
|
||||
<h2>Password</h2>
|
||||
{{if eq .Section "password"}}<p class="error" role="alert">{{.Problem}}</p>{{end}}
|
||||
|
||||
Reference in New Issue
Block a user