@* Asset - Dialog Panel *@ @* View is decoupled from Asset model as it may be included in other views, eg. Vehicles. *@ @model SbmModel_Portal @inject SbmLocaliser Localiser @{ // Ensure view is only included once in page. if (!Model.RegisterView(Html.ViewContext)) return; Model.AdditionalFiles_JS.Add("js/sbm-asset.js"); } @using (@Html.BeginForm(FormMethod.Post, new { @id = "frmAssetId", @onSubmit = "return false;" })) { @Html.Hidden("Asset.Id", "", new { @id = "", @class = $"{Model_Asset.GetFieldName(Model_Asset.ItemField.Id)}" }) }
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmAsset", @class = "sbm-form", @onSubmit = "return false;" })) { @Html.Hidden("Asset.Exists", "", new { @id = "", @class = $"{Model_Asset.GetFieldName(Model_Asset.ItemField.Exists)} sbm-input sbm-auto-val" }) @Html.Hidden("Asset.Id", "", new { @id = "", @class = $"{Model_Asset.GetFieldName(Model_Asset.ItemField.Id)} sbm-input sbm-auto-val" }) @* Type *@
@Html.Hidden("Asset.CategoryId", "", new { @id = "", @class = $"{Model_Asset.GetFieldName(Model_Asset.ItemField.CategoryId)} sbm-input sbm-auto-val" })
@* Serial Number*@
@Html.TextBox("Asset.SerialNumber", "", new { @id = "ifAssetSerialNumber", @class = $"{Model_Asset.GetFieldName(Model_Asset.ItemField.SerialNumber)} sbm-input sbm-auto-val upper", @autocomplete = "off", @maxlength = @Model.GetControlMaxLength(SbmDbDfn.ColumnIdx.SaAsset_SerialNumber) })
@* Description *@
@Html.TextBox("Asset.DescBrief", "", new { @id = "ifAssetDescription", @class = $"{Model_Asset.GetFieldName(Model_Asset.ItemField.Caption)} sbm-input sbm-auto-val", @autocomplete = "off", @maxlength = @Model.GetControlMaxLength(SbmDbDfn.ColumnIdx.SaAsset_DescBrief) })
@* Status *@
@* Notes *@
@Html.TextArea("Asset.Notes", "", new { @id = "ifAssetNotes", @class = $"{Model_Asset.GetFieldName(Model_Asset.ItemField.Notes)} sbm-textarea sbm-auto-val", @autocomplete = "off", @rows = 3, @maxlength = @Model.GetControlMaxLength(SbmDbDfn.ColumnIdx.SaAsset_Notes) })
}
@* Select Item dialog and script *@