Changeset 6886d95 for KernelRecordsMVC.Web/Views/Admin/CreateProduct.cshtml
- Timestamp:
- 09/11/26 06:39:52 (2 weeks ago)
- Branches:
- main
- Children:
- f939d10
- Parents:
- 1dcdb2c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
KernelRecordsMVC.Web/Views/Admin/CreateProduct.cshtml
r1dcdb2c r6886d95 35 35 36 36 37 <div class="admin-form-layout"> 38 39 40 <!-- ================================================= 41 FORM 42 ================================================= --> 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 43 51 44 52 <section class="admin-form-card"> … … 55 63 56 64 57 <form asp-action="CreateProduct" 58 method="post"> 59 60 @Html.AntiForgeryToken() 61 62 63 <div asp-validation-summary="ModelOnly" 64 class="admin-validation"> 65 </div> 66 67 68 <!-- RELEASE --> 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 --> 69 107 70 108 <div class="admin-form-field"> 71 109 72 <label asp-for=" ReleaseId">73 Release110 <label asp-for="Format"> 111 Format 74 112 </label> 75 113 76 <select asp-for="ReleaseId"> 114 <select asp-for="Format" 115 asp-items="Html.GetEnumSelectList<KernelRecordsMVC.Domain.Enums.ProductFormat>()"> 77 116 78 117 <option value=""> 79 Select a release118 Select format 80 119 </option> 81 120 82 @foreach (var release in ViewBag.Releases)83 {84 <option value="@release.ReleaseId">85 86 @release.Title87 (@release.ReleaseDate.ToString("yyyy"))88 89 </option>90 }91 92 121 </select> 93 122 94 <span asp-validation-for=" ReleaseId"123 <span asp-validation-for="Format" 95 124 class="admin-field-error"> 96 125 </span> 97 126 98 <small>99 Select the release this physical100 product belongs to.101 </small>102 103 127 </div> 104 128 105 129 106 <div class="admin-form-row"> 107 108 109 <!-- FORMAT --> 110 111 <div class="admin-form-field"> 112 113 <label asp-for="Format"> 114 Format 115 </label> 116 117 <select asp-for="Format" 118 asp-items="Html.GetEnumSelectList<KernelRecordsMVC.Domain.Enums.ProductFormat>()"> 119 120 <option value=""> 121 Select format 122 </option> 123 124 </select> 125 126 <span asp-validation-for="Format" 127 class="admin-field-error"> 128 </span> 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" /> 129 147 130 148 </div> 131 149 132 133 <!-- PRICE --> 134 135 <div class="admin-form-field"> 136 137 <label asp-for="Price"> 138 Price 139 </label> 140 141 <div class="admin-input-prefix"> 142 143 <span>$</span> 144 145 <input asp-for="Price" 146 type="number" 147 min="0" 148 step="0.01" 149 placeholder="0.00" /> 150 151 </div> 152 153 <span asp-validation-for="Price" 154 class="admin-field-error"> 155 </span> 156 157 </div> 158 159 </div> 160 161 162 <!-- STOCK --> 163 164 <div class="admin-form-field"> 165 166 <label asp-for="Stock"> 167 Initial Stock 168 </label> 169 170 <input asp-for="Stock" 171 type="number" 172 min="0" 173 placeholder="0" /> 174 175 <span asp-validation-for="Stock" 150 <span asp-validation-for="Price" 176 151 class="admin-field-error"> 177 152 </span> … … 179 154 </div> 180 155 181 182 <!-- DESCRIPTION --> 183 184 <div class="admin-form-field"> 185 186 <label asp-for="ProductDescription"> 187 Product Description 188 </label> 189 190 <textarea asp-for="ProductDescription" 191 rows="5" 192 placeholder="Describe this physical edition..."></textarea> 193 194 <span asp-validation-for="ProductDescription" 195 class="admin-field-error"> 196 </span> 197 198 </div> 199 200 201 <!-- ACTIONS --> 202 203 <div class="admin-form-actions"> 204 205 <button type="submit" 206 class="admin-button primary"> 207 208 Create Product 209 210 </button> 211 212 213 <a asp-action="Products" 214 class="admin-button secondary"> 215 216 Cancel 217 218 </a> 219 220 </div> 221 222 </form> 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> 223 218 224 219 </section> 225 220 226 227 <!-- ================================================= 228 SIDE INFO 229 ================================================= --> 230 231 <aside class="admin-help-card"> 232 233 <span class="admin-eyebrow"> 234 PRODUCT CREATION 235 </span> 236 237 <h3>Before you create</h3> 238 239 <div class="admin-help-item"> 240 241 <strong>01</strong> 242 243 <p> 244 A release can only have one product 245 for each physical format. 246 </p> 247 248 </div> 249 250 251 <div class="admin-help-item"> 252 253 <strong>02</strong> 254 255 <p> 256 Stock can be updated later from 257 Product Management. 258 </p> 259 260 </div> 261 262 263 <div class="admin-help-item"> 264 265 <strong>03</strong> 266 267 <p> 268 Creating the product will automatically 269 create a modification record. 270 </p> 271 272 </div> 273 274 </aside> 275 276 </div> 221 </form> 277 222 278 223 </div>
Note:
See TracChangeset
for help on using the changeset viewer.
