chore: product edit-create view intent fixes

* skip ci
This commit is contained in:
surtur 2021-02-12 22:56:57 +01:00
parent dc7d505937
commit 3be55f23be
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -3,13 +3,15 @@
@{
if((!String.IsNullOrEmpty(ViewBag.Action))||(!String.IsNullOrWhiteSpace(ViewBag.Action)))
{
<div class="row">
<div class="row">
<form asp-action="@ViewBag.Action" enctype="multipart/form-data" method="post">
<div class="form-group col-sm-4">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
@{if (@ViewBag.Action == nameof(ProductController.Edit)){
<input type="hidden" asp-for="@Model.id" class="form-control">
}}
@{
if (@ViewBag.Action == nameof(ProductController.Edit)){
<input type="hidden" asp-for="@Model.id" class="form-control">
}
}
<div class="form-group">
<label asp-for="@Model.Name"></label>
<input asp-for="@Model.Name" class="form-control" aria-describedby="product name" placeholder="product name">