| | | 1 | | @model OzonDomains.Models.Product |
| | | 2 | | |
| | | 3 | | @{ |
| | 0 | 4 | | ViewData["Title"] = $"Редактирование товара - {Model?.Article ?? Model?.Id.ToString() ?? "N/A"}"; |
| | 0 | 5 | | Layout = "~/Views/Shared/_Layout.cshtml"; |
| | | 6 | | } |
| | | 7 | | |
| | 0 | 8 | | @await Html.PartialAsync("_BsxGridShell") |
| | | 9 | | |
| | | 10 | | <div class="container py-3 bsx-surface"> |
| | | 11 | | <h1>Edit</h1> |
| | | 12 | | |
| | | 13 | | <h4>Product</h4> |
| | | 14 | | <hr /> |
| | | 15 | | <div class="row"> |
| | | 16 | | <div class="col-md-4"> |
| | | 17 | | <form asp-area="Studio2" asp-controller="Products" asp-action="Edit"> |
| | | 18 | | <div asp-validation-summary="ModelOnly" class="text-danger"></div> |
| | | 19 | | <input type="hidden" asp-for="Id" /> |
| | | 20 | | <div class="form-group"> |
| | | 21 | | <label asp-for="Article" class="control-label"></label> |
| | | 22 | | <input asp-for="Article" class="form-control" /> |
| | | 23 | | <span asp-validation-for="Article" class="text-danger"></span> |
| | | 24 | | </div> |
| | | 25 | | <div class="form-group"> |
| | | 26 | | <label asp-for="OzonProductId" class="control-label"></label> |
| | | 27 | | <input asp-for="OzonProductId" class="form-control" /> |
| | | 28 | | <span asp-validation-for="OzonProductId" class="text-danger"></span> |
| | | 29 | | </div> |
| | | 30 | | <div class="form-group"> |
| | | 31 | | <label asp-for="FboOzonSkuId" class="control-label"></label> |
| | | 32 | | <input asp-for="FboOzonSkuId" class="form-control" /> |
| | | 33 | | <span asp-validation-for="FboOzonSkuId" class="text-danger"></span> |
| | | 34 | | </div> |
| | | 35 | | <div class="form-group"> |
| | | 36 | | <label asp-for="FbsOzonSkuId" class="control-label"></label> |
| | | 37 | | <input asp-for="FbsOzonSkuId" class="form-control" /> |
| | | 38 | | <span asp-validation-for="FbsOzonSkuId" class="text-danger"></span> |
| | | 39 | | </div> |
| | | 40 | | <div class="form-group"> |
| | | 41 | | <label asp-for="CommercialCategory" class="control-label"></label> |
| | | 42 | | <input asp-for="CommercialCategory" class="form-control" /> |
| | | 43 | | <span asp-validation-for="CommercialCategory" class="text-danger"></span> |
| | | 44 | | </div> |
| | | 45 | | <div class="form-group"> |
| | | 46 | | <label asp-for="Volume" class="control-label"></label> |
| | | 47 | | <input asp-for="Volume" class="form-control" /> |
| | | 48 | | <span asp-validation-for="Volume" class="text-danger"></span> |
| | | 49 | | </div> |
| | | 50 | | <div class="form-group"> |
| | | 51 | | <label asp-for="VolumetricWeight" class="control-label"></label> |
| | | 52 | | <input asp-for="VolumetricWeight" class="form-control" /> |
| | | 53 | | <span asp-validation-for="VolumetricWeight" class="text-danger"></span> |
| | | 54 | | </div> |
| | | 55 | | <div class="form-group"> |
| | | 56 | | <label asp-for="CurrentPriceWithDiscount" class="control-label"></label> |
| | | 57 | | <input asp-for="CurrentPriceWithDiscount" class="form-control" /> |
| | | 58 | | <span asp-validation-for="CurrentPriceWithDiscount" class="text-danger"></span> |
| | | 59 | | </div> |
| | | 60 | | <div class="form-group"> |
| | | 61 | | <input type="submit" value="Save" class="btn btn-primary" /> |
| | | 62 | | </div> |
| | | 63 | | </form> |
| | | 64 | | </div> |
| | | 65 | | </div> |
| | | 66 | | |
| | | 67 | | <div> |
| | | 68 | | <a asp-action="Index">Back to List</a> |
| | | 69 | | </div> |
| | | 70 | | </div> |
| | | 71 | | |
| | | 72 | | @section Scripts { |
| | 0 | 73 | | @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} |
| | | 74 | | <script> |
| | | 75 | | $.validator.methods.range = function (value, element, param) { |
| | | 76 | | var globalizedValue = value.replace(",", "."); |
| | | 77 | | return this.optional(element) || (globalizedValue >= param[0] && globalizedValue <= param[1]); |
| | | 78 | | } |
| | | 79 | | |
| | | 80 | | $.validator.methods.number = function (value, element) { |
| | | 81 | | return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:[\s\.,]\d{3})+)(?:[\.,]\d+)?$/.test(value); |
| | | 82 | | } |
| | | 83 | | </script> |
| | | 84 | | } |