|
2 | 2 | @model JoinRpg.Web.Models.Characters.AddCharacterViewModel |
3 | 3 |
|
4 | 4 | @{ |
5 | | - ViewBag.Title = "Добавление персонажа в игру " + Model.ProjectName; |
| 5 | + ViewBag.Title = "Добавление персонажа в игру " + Model.ProjectName; |
6 | 6 | } |
7 | 7 |
|
8 | 8 | <h2>@ViewBag.Title</h2> |
9 | 9 |
|
10 | 10 |
|
11 | | -@using (Html.BeginForm("Create", "Character", new { Model.ProjectId }, FormMethod.Post)) |
| 11 | +@using (Html.BeginForm("Create", "Character", new {Model.ProjectId}, FormMethod.Post)) |
12 | 12 | { |
13 | | - @Html.AntiForgeryToken() |
14 | | - @Html.HiddenFor(model => model.ProjectId) |
| 13 | + @Html.AntiForgeryToken() |
| 14 | + @Html.HiddenFor(model => model.ProjectId) |
15 | 15 |
|
16 | | - <div class="form-horizontal"> |
| 16 | +<div class="form-horizontal"> |
17 | 17 | @if (Model.LegacyNameMode) |
18 | 18 | { |
19 | | - <div class="form-group"> |
| 19 | + <div class="form-group"> |
20 | 20 | @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2" }) |
21 | 21 | <div class="col-md-10"> |
22 | | - @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } }) |
23 | | - @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" }) |
| 22 | + @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } }) |
| 23 | + @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" }) |
24 | 24 | </div> |
25 | | - </div> |
| 25 | + </div> |
26 | 26 | } |
27 | 27 |
|
28 | 28 | <div class="form-group"> |
29 | | - @Html.LabelFor(model => model.ParentCharacterGroupIds, htmlAttributes: new { @class = "control-label col-md-2" }) |
30 | | - <div class="col-md-10"> |
31 | | - <component type="typeof(JoinRpg.Web.CharacterGroups.CharacterGroupSelector)" |
32 | | - param-ProjectId="Model.ProjectId" |
33 | | - param-Name="@("ParentCharacterGroupIds")" |
34 | | - param-SelectedGroups="@(Model.ParentCharacterGroupIds)" |
35 | | - render-mode="WebAssembly" /> |
36 | | - </div> |
| 29 | + @Html.LabelFor(model => model.ParentCharacterGroupIds, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 30 | + <div class="col-md-10"> |
| 31 | + @Html.MagicSelectParent(model => model.ParentCharacterGroupIds) |
| 32 | + @Html.ValidationMessageFor(model => model.ParentCharacterGroupIds, "", new { @class = "text-danger" }) |
| 33 | + </div> |
37 | 34 | </div> |
38 | 35 |
|
39 | 36 | <div class="form-group"> |
40 | | - @Html.LabelFor(model => model.IsPublic, htmlAttributes: new { @class = "control-label col-md-2" }) |
41 | | - <div class="col-md-10"> |
42 | | - @Html.EditorFor(model => model.IsPublic) |
43 | | - @Html.ValidationMessageFor(model => model.IsPublic, "", new { @class = "text-danger" }) |
44 | | - </div> |
| 37 | + @Html.LabelFor(model => model.IsPublic, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 38 | + <div class="col-md-10"> |
| 39 | + @Html.EditorFor(model => model.IsPublic) |
| 40 | + @Html.ValidationMessageFor(model => model.IsPublic, "", new { @class = "text-danger" }) |
| 41 | + </div> |
45 | 42 | </div> |
46 | 43 |
|
47 | 44 | <div class="form-group"> |
48 | | - @Html.LabelFor(model => model.IsAcceptingClaims, htmlAttributes: new { @class = "control-label col-md-2" }) |
49 | | - <div class="col-md-10"> |
50 | | - @Html.EditorFor(model => model.IsAcceptingClaims) |
51 | | - @Html.ValidationMessageFor(model => model.IsAcceptingClaims, "", new { @class = "text-danger" }) |
52 | | - </div> |
| 45 | + @Html.LabelFor(model => model.IsAcceptingClaims, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 46 | + <div class="col-md-10"> |
| 47 | + @Html.EditorFor(model => model.IsAcceptingClaims) |
| 48 | + @Html.ValidationMessageFor(model => model.IsAcceptingClaims, "", new { @class = "text-danger" }) |
| 49 | + </div> |
53 | 50 | </div> |
54 | 51 |
|
55 | 52 | <div class="form-group"> |
56 | | - @Html.LabelFor(model => model.HidePlayerForCharacter, htmlAttributes: new { @class = "control-label col-md-2" }) |
57 | | - <div class="col-md-10"> |
58 | | - @Html.EditorFor(model => model.HidePlayerForCharacter) |
59 | | - @Html.ValidationMessageFor(model => model.HidePlayerForCharacter, "", new { @class = "text-danger" }) |
60 | | - </div> |
| 53 | + @Html.LabelFor(model => model.HidePlayerForCharacter, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 54 | + <div class="col-md-10"> |
| 55 | + @Html.EditorFor(model => model.HidePlayerForCharacter) |
| 56 | + @Html.ValidationMessageFor(model => model.HidePlayerForCharacter, "", new { @class = "text-danger" }) |
| 57 | + </div> |
61 | 58 | </div> |
62 | 59 |
|
63 | 60 | <div class="form-group"> |
64 | | - @Html.LabelFor(model => model.IsHot, htmlAttributes: new { @class = "control-label col-md-2" }) |
65 | | - <div class="col-md-10"> |
66 | | - @Html.EditorFor(model => model.IsHot) |
67 | | - @Html.ValidationMessageFor(model => model.IsHot, "", new { @class = "text-danger" }) |
68 | | - </div> |
| 61 | + @Html.LabelFor(model => model.IsHot, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 62 | + <div class="col-md-10"> |
| 63 | + @Html.EditorFor(model => model.IsHot) |
| 64 | + @Html.ValidationMessageFor(model => model.IsHot, "", new { @class = "text-danger" }) |
| 65 | + </div> |
69 | 66 | </div> |
70 | 67 |
|
71 | 68 | @await Html.PartialAsync("_EditFieldsPartial", Model.Fields) |
72 | 69 |
|
73 | 70 | @if (Model.Fields.Fields.Any(f => f.HasPrice)) |
74 | 71 | { |
75 | | - Html.RenderPartial("_CharacterFieldsSubtotal", Model.Fields); |
| 72 | + Html.RenderPartial("_CharacterFieldsSubtotal", Model.Fields); |
76 | 73 | } |
77 | 74 |
|
78 | 75 | <div class="form-group"> |
79 | | - @Html.LabelFor(model => model.ContinueCreating, htmlAttributes: new { @class = "control-label col-md-2" }) |
80 | | - <div class="col-md-10"> |
81 | | - @Html.EditorFor(model => model.ContinueCreating) |
82 | | - @Html.ValidationMessageFor(model => model.ContinueCreating, "", new { @class = "text-danger" }) |
83 | | - @Html.DescriptionFor(model => model.ContinueCreating) |
84 | | - </div> |
| 76 | + @Html.LabelFor(model => model.ContinueCreating, htmlAttributes: new { @class = "control-label col-md-2" }) |
| 77 | + <div class="col-md-10"> |
| 78 | + @Html.EditorFor(model => model.ContinueCreating) |
| 79 | + @Html.ValidationMessageFor(model => model.ContinueCreating, "", new { @class = "text-danger" }) |
| 80 | + @Html.DescriptionFor(model => model.ContinueCreating) |
| 81 | + </div> |
85 | 82 | </div> |
86 | 83 |
|
87 | 84 | <div class="form-group"> |
88 | | - <div class="col-md-offset-2 col-md-10"> |
89 | | - <input type="submit" value="Создать персонажа" class="btn btn-success" /> | |
90 | | - @Html.ActionLink("Назад к сетке ролей", "Index", "GameGroups", new { @Model.ProjectId }, null) |
91 | | - </div> |
| 85 | + <div class="col-md-offset-2 col-md-10"> |
| 86 | + <input type="submit" value="Создать персонажа" class="btn btn-success" /> | |
| 87 | + @Html.ActionLink("Назад к сетке ролей", "Index", "GameGroups", new { @Model.ProjectId }, null) |
| 88 | + </div> |
92 | 89 | </div> |
93 | | - </div> |
94 | | -} |
95 | | - |
96 | | -@section Scripts { |
97 | | - <script src="/_framework/blazor.webassembly.js"></script> |
98 | | - <script src="_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js"></script> |
99 | | - <script src="/Scripts/blazor-interop.js"></script> |
100 | | - |
| 90 | +</div> |
101 | 91 | } |
0 commit comments