internal/web/templates/new.html
33 lines · 1629 bytes
1{{define "width"}}bounded{{end}}
2{{define "title"}}new repository · {{.Site}}{{end}}
3{{define "content"}}
4<h1>New</h1>
5<h2>Repository</h2>
6{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
7<form method="post" action="/new">
8<p><label>Owner <select name="owner">
9 <option value="{{.Viewer}}">{{.Viewer}}</option>
10 {{range .Orgs}}<option value="{{.}}">{{.}}</option>{{end}}
11</select></label>
12<label>/ Name <input name="name" required maxlength="63" pattern="[a-z0-9][a-z0-9._\-]{0,62}" aria-describedby="namehint"></label>
13<span class="hint" id="namehint">Lowercase letters, digits, dot, dash and underscore; must start with a letter or digit; up to 63 characters.</span></p>
14<fieldset class="segmented">
15 <legend>Visibility</legend>
16 <div class="options">
17 <label><input type="radio" name="visibility" value="public" checked><span>Public</span></label>
18 <label><input type="radio" name="visibility" value="private"><span>Private</span></label>
19 </div>
20</fieldset>
21<p><button type="submit">Create repository</button></p>
22</form>
23
24<h2 id="org">Organization</h2>
25<p class="meta">An organization owns repositories, labels and milestones, and
26grants access through teams. You are its first admin.</p>
27<form method="post" action="/new">
28<input type="hidden" name="field" value="org-create">
29<p><label>Name <input name="name" required maxlength="63" pattern="[a-z0-9][a-z0-9._\-]{0,62}" aria-describedby="orghint"></label>
30<span class="hint" id="orghint">The same rules as a repository name, and it becomes a top-level path.</span></p>
31<p><button type="submit">Create organization</button></p>
32</form>
33{{end}}