Files
FSI.BT.IR.Organization/scr/FSI.BT.IR.Organization.Web/Views/Home/AddOrEdit.cshtml
2024-10-25 13:35:06 +02:00

57 lines
2.1 KiB
Plaintext

@using FSI.BT.IR.Organization.Db.Models
@{
Layout = null;
}
@model Organization
<div class="row">
<form asp-action="AddOrEdit" asp-route-id="@Model.Id" onsubmit="return jQueryAjaxPost(this);">
<input hidden asp-for="Id" class="form-control" />
<input hidden asp-for="FullShortName" class="form-control" />
<input hidden asp-for="Created" class="form-control" />
<input hidden asp-for="Updated" class="form-control" />
<div class="form-group">
<label asp-for="ShortName" class="control-label"></label>
<input asp-for="ShortName" class="form-control" id="ctrlToFocus" />
<span asp-validation-for="ShortName" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Name" class="control-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Description" class="control-label"></label>
<input asp-for="Description" class="form-control" />
<span asp-validation-for="Description" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Type" class="control-label"></label>
<select asp-for="Type" asp-items="Html.GetEnumSelectList<FSI.BT.IR.Organization.Db.Models.OrganizationType>()" class="form-control"></select>
<span asp-validation-for="Type" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ParentId" class="control-label"></label>
<select asp-for="ParentId" asp-items="@(new SelectList(from x in Model.Parents orderby x.ShortName select new { Value= x.Id, Text = x.FullShortName + " - " + x.Name} , "Value", "Text"))" class="form-control"></select>
</div>
<hr />
<div class="form-group">
<input type="submit" value="Submit" class="btn btn-primary btn-block" />
</div>
</form>
</div>