Ignore:
Timestamp:
09/11/26 06:39:52 (2 weeks ago)
Author:
mmilevski <markomilevski3@…>
Branches:
main
Children:
f939d10
Parents:
1dcdb2c
Message:

Minor UI fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • KernelRecordsMVC.Web/Views/Admin/CreateProduct.cshtml

    r1dcdb2c r6886d95  
    3535
    3636
    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
    4351
    4452        <section class="admin-form-card">
    … …  
    5563
    5664
    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 -->
    69107
    70108                <div class="admin-form-field">
    71109
    72                     <label asp-for="ReleaseId">
    73                         Release
     110                    <label asp-for="Format">
     111                        Format
    74112                    </label>
    75113
    76                     <select asp-for="ReleaseId">
     114                    <select asp-for="Format"
     115                            asp-items="Html.GetEnumSelectList<KernelRecordsMVC.Domain.Enums.ProductFormat>()">
    77116
    78117                        <option value="">
    79                             Select a release
     118                            Select format
    80119                        </option>
    81120
    82                         @foreach (var release in ViewBag.Releases)
    83                         {
    84                             <option value="@release.ReleaseId">
    85 
    86                                 @release.Title
    87                                 (@release.ReleaseDate.ToString("yyyy"))
    88 
    89                             </option>
    90                         }
    91 
    92121                    </select>
    93122
    94                     <span asp-validation-for="ReleaseId"
     123                    <span asp-validation-for="Format"
    95124                          class="admin-field-error">
    96125                    </span>
    97126
    98                     <small>
    99                         Select the release this physical
    100                         product belongs to.
    101                     </small>
    102 
    103127                </div>
    104128
    105129
    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" />
    129147
    130148                    </div>
    131149
    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"
    176151                          class="admin-field-error">
    177152                    </span>
    … …  
    179154                </div>
    180155
    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>
    223218
    224219        </section>
    225220
    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>
    277222
    278223</div>
Note: See TracChangeset for help on using the changeset viewer.