Phase 13, part 3: signing up, and several teams per person
On the multi-tenant edition anyone can set up a team: their account, the company and its website, whose registered domain the team works on (the profile keeps to it). A person can belong to several teams and switch between them from the sidebar, or set up another. Inviting someone who has an account adds them to the team. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,12 @@
|
||||
<div class="shell">
|
||||
<aside class="sidebar" id="sidebar">
|
||||
<a class="brand" href="/"><img class="logo" src="/static/logo.png" alt="" width="28" height="28">Supermarket</a>
|
||||
{{if .Teams}}<form class="team-switch" method="post" action="/teams/switch">
|
||||
<label class="visually-hidden" for="team-pick">Team</label>
|
||||
<select name="team" id="team-pick" data-autosubmit>{{range .Teams}}<option value="{{.ID}}" {{if eq .ID $.TeamID}}selected{{end}}>{{.Name}}</option>{{end}}</select>
|
||||
<noscript><button type="submit" class="secondary small">Switch</button></noscript>
|
||||
<a href="/teams/new" class="small">New team</a>
|
||||
</form>{{end}}
|
||||
<form class="search" action="/search" method="get" role="search">
|
||||
{{template "icon" "search"}}
|
||||
<input type="search" name="q" value="{{.Query}}" placeholder="Search" aria-label="Search" id="search-box">
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
<label>Password <input type="password" name="password" autocomplete="current-password" required {{if .Email}}autofocus{{end}}></label>
|
||||
<button type="submit">Sign in</button>
|
||||
</form>
|
||||
<p class="help"><a href="/forgot{{with .Email}}?email={{.}}{{end}}">Forgotten your password?</a></p>
|
||||
<p class="help"><a href="/forgot{{with .Email}}?email={{.}}{{end}}">Forgotten your password?</a>{{if $.Multi}} · New here? <a href="/signup">Set up your team</a>{{end}}</p>
|
||||
{{end}}
|
||||
{{end}}{{end}}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{{define "content"}}{{with .Data}}
|
||||
<h1>Set up your team</h1>
|
||||
<p class="lede">Supermarket for your company: posts, prospects, SEO and your sites, for the team you invite. It works on one website domain, such as example.com, with its subdomains.</p>
|
||||
{{with .Problem}}<p class="error" role="alert">{{.}}</p>{{end}}
|
||||
<form class="card" method="post" action="/signup">
|
||||
<label>Your name <input name="name" autocomplete="name"></label>
|
||||
<label>Your email address <input type="email" name="email" value="{{.Email}}" autocomplete="username" required autofocus></label>
|
||||
<label>Choose a password <input type="password" name="password" autocomplete="new-password" minlength="10" required>
|
||||
<span class="help">At least 10 characters.</span></label>
|
||||
<label>The company's name <input name="company" value="{{.Company}}" autocomplete="organization" required></label>
|
||||
<label>Its website <input name="website" value="{{.Website}}" placeholder="example.com" required>
|
||||
<span class="help">Your team works on this domain and its subdomains. You'll prove it's yours before Supermarket reads or changes the site.</span></label>
|
||||
<button type="submit">Set up the team</button>
|
||||
</form>
|
||||
<p class="help">Already have an account? <a href="/signin">Sign in</a>.</p>
|
||||
{{end}}{{end}}
|
||||
@@ -0,0 +1,10 @@
|
||||
{{define "content"}}{{with .Data}}
|
||||
<div class="page-head"><h1>Another team</h1>
|
||||
<p class="lede">A team works on one website domain. For another company, or another domain, set up another team: you're its owner, and switch between your teams from the menu.</p></div>
|
||||
{{with .Problem}}<p class="error" role="alert">{{.}}</p>{{end}}
|
||||
<form class="card" method="post" action="/teams/new">
|
||||
<label>The company's name <input name="company" value="{{.Company}}" required></label>
|
||||
<label>Its website <input name="website" value="{{.Website}}" placeholder="example.com" required></label>
|
||||
<button type="submit">Set up the team</button>
|
||||
</form>
|
||||
{{end}}{{end}}
|
||||
Reference in New Issue
Block a user