source: KernelRecordsMVC.Web/Views/Admin/CreateProduct.cshtml

main
Last change on this file was 6886d95, checked in by mmilevski <markomilevski3@…>, 2 weeks ago

Minor UI fixes.

  • Property mode set to 100644
File size: 5.0 KB
Line 
1@model KernelRecordsMVC.Application.ViewModels.CreateProductViewModel
2
3@{
4 ViewData["Title"] = "New Product";
5}
6
7<div class="admin-page admin-form-page">
8
9 <!-- HEADER -->
10
11 <div class="admin-header">
12
13 <div>
14
15 <a asp-action="Products"
16 class="admin-back-link">
17
18 ← Products
19
20 </a>
21
22 <span class="admin-eyebrow">
23 INVENTORY
24 </span>
25
26 <h1>New Product</h1>
27
28 <p>
29 Add a new physical format to an existing release.
30 </p>
31
32 </div>
33
34 </div>
35
36
37 <!-- =================================================
38 FORM
39 ================================================= -->
40
41 <form asp-action="CreateProduct"
42 method="post">
43
44 @Html.AntiForgeryToken()
45
46
47 <div asp-validation-summary="ModelOnly"
48 class="admin-validation">
49 </div>
50
51
52 <section class="admin-form-card">
53
54 <div class="admin-form-card-header">
55
56 <span class="admin-eyebrow">
57 PRODUCT INFORMATION
58 </span>
59
60 <h2>Product Details</h2>
61
62 </div>
63
64
65 <!-- RELEASE -->
66
67 <div class="admin-form-field">
68
69 <label asp-for="ReleaseId">
70 Release
71 </label>
72
73 <select asp-for="ReleaseId">
74
75 <option value="">
76 Select a release
77 </option>
78
79 @foreach (var release in ViewBag.Releases)
80 {
81 <option value="@release.ReleaseId">
82
83 @release.Title
84 (@release.ReleaseDate.ToString("yyyy"))
85
86 </option>
87 }
88
89 </select>
90
91 <span asp-validation-for="ReleaseId"
92 class="admin-field-error">
93 </span>
94
95 <small>
96 Select the release this physical
97 product belongs to.
98 </small>
99
100 </div>
101
102
103 <div class="admin-form-row">
104
105
106 <!-- FORMAT -->
107
108 <div class="admin-form-field">
109
110 <label asp-for="Format">
111 Format
112 </label>
113
114 <select asp-for="Format"
115 asp-items="Html.GetEnumSelectList<KernelRecordsMVC.Domain.Enums.ProductFormat>()">
116
117 <option value="">
118 Select format
119 </option>
120
121 </select>
122
123 <span asp-validation-for="Format"
124 class="admin-field-error">
125 </span>
126
127 </div>
128
129
130 <!-- PRICE -->
131
132 <div class="admin-form-field">
133
134 <label asp-for="Price">
135 Price
136 </label>
137
138 <div class="admin-input-prefix">
139
140 <span>$</span>
141
142 <input asp-for="Price"
143 type="number"
144 min="0"
145 step="0.01"
146 placeholder="0.00" />
147
148 </div>
149
150 <span asp-validation-for="Price"
151 class="admin-field-error">
152 </span>
153
154 </div>
155
156 </div>
157
158
159 <!-- STOCK -->
160
161 <div class="admin-form-field">
162
163 <label asp-for="Stock">
164 Initial Stock
165 </label>
166
167 <input asp-for="Stock"
168 type="number"
169 min="0"
170 placeholder="0" />
171
172 <span asp-validation-for="Stock"
173 class="admin-field-error">
174 </span>
175
176 </div>
177
178
179 <!-- DESCRIPTION -->
180
181 <div class="admin-form-field">
182
183 <label asp-for="ProductDescription">
184 Product Description
185 </label>
186
187 <textarea asp-for="ProductDescription"
188 rows="5"
189 placeholder="Describe this physical edition..."></textarea>
190
191 <span asp-validation-for="ProductDescription"
192 class="admin-field-error">
193 </span>
194
195 </div>
196
197
198 <!-- ACTIONS -->
199
200 <div class="admin-form-actions">
201
202 <button type="submit"
203 class="admin-button primary">
204
205 Create Product
206
207 </button>
208
209
210 <a asp-action="Products"
211 class="admin-button secondary">
212
213 Cancel
214
215 </a>
216
217 </div>
218
219 </section>
220
221 </form>
222
223</div>
224
225
226@section Scripts
227{
228 <partial name="_ValidationScriptsPartial" />
229}
Note: See TracBrowser for help on using the repository browser.