Code
·
42 lines
·
1587 bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42@page "/Repo/New"
@model GitServer.wwwroot.Repo.NewModel
@{
ViewData["Title"] = L["new_repo_page_title"];
}
<div class="container">
@if (Model.CurrentUser != null)
{
@await Html.PartialAsync("_ProfileHeader", Model.CurrentUser)
@await Html.PartialAsync("_UserNav", (Model.CurrentUser.UserName!, "new", true))
}
<h1>@L["new_repo_title"]</h1>
@if (!string.IsNullOrEmpty(Model.ErrorMessage))
{
<div class="alert alert-danger">@Model.ErrorMessage</div>
}
<form method="post">
<div class="form-group">
<label for="name">@L["repo_name_label"] <span class="required">*</span></label>
<input asp-for="Name" id="name" type="text" class="form-control"
required
pattern="[a-zA-Z0-9_\-\.]+" title="@L["repo_name_hint"]" autofocus />
<span class="form-hint">@L["repo_name_hint"]</span>
</div>
<div class="form-group">
<label for="description">@L["description_label"]</label>
<input asp-for="Description" id="description" type="text" class="form-control" />
</div>
<div class="form-group">
<label class="checkbox-label">
<input asp-for="IsPrivate" type="checkbox" />
@L["new_repo_private_label"]
</label>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">@L["new_repo_submit"]</button>
<a href="/" class="btn btn-secondary">@L["cancel"]</a>
</div>
</form>
</div>