Files
BusinessMgr-2019/SaBusinessMgrCoreWebPortal/Views/Vehicles/VehicleClass/Panel-VehicleClassDialog.cshtml
T
2025-11-29 17:03:00 +00:00

85 lines
3.5 KiB
Plaintext

@* Vehicle Class - Dialog panel *@
@* View is decoupled from Vehicle Class 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-veh-cls.js");
string NamePrefix = Model_VehicleClass.FieldNamePrefix;
}
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmVehicleClassId", @onSubmit = "return false;" }))
{
@Html.Hidden("VehicleClass.Id", "", new { @id = "", @class = $"{Model_VehicleClass.GetFieldName(Model_VehicleClass.ItemField.Id)}" })
}
<div id="dlgVehicleClass" class="sbm-dialog">
<div class="spacer2"></div>
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmVehicleClass", @class = "sbm-form", @onSubmit = "return false;" }))
{
@Html.Hidden("VehicleClass.Exists", "", new { @id = "", @class = $"{Model_VehicleClass.GetFieldName(Model_VehicleClass.ItemField.Exists)} sbm-input sbm-auto-val" })
@Html.Hidden("VehicleClass.Id", "", new { @id = "", @class = $"{Model_VehicleClass.GetFieldName(Model_VehicleClass.ItemField.Id)} sbm-input sbm-auto-val" })
@* Vehicle Type *@
<sbm-form-control
label="@Localiser["label.type"]"
name-prefix="@NamePrefix" form-control-name-suffix="VehicleType" control-name-suffix="VehicleTypeCode"
control-type="select" binding-name="VehicleClass.VehicleTypeCode">
</sbm-form-control>
@* Vehicle Category *@
<sbm-form-control
label="@Localiser["label.category"]"
name-prefix="@NamePrefix" form-control-name-suffix="VehicleCategory" control-name-suffix="VehicleCategoryCode"
control-type="select" binding-name="VehicleClass.VehicleCategoryCode">
</sbm-form-control>
@* Make *@
<sbm-form-control
label="@Localiser["label.make"]" required="true"
name-prefix="@NamePrefix" form-control-name-suffix="Make" control-name-suffix="MakeCode"
control-type="select" binding-name="VehicleClass.MakeCode">
</sbm-form-control>
@* Model *@
<sbm-form-control
label="@Localiser["label.model"]" required="true"
name-prefix="@NamePrefix" control-name-suffix="Model"
control-type="input" binding-name="VehicleClass.Model" max-length="@Model.GetControlMaxLength(SbmDbDfn.ColumnIdx.SaVehicleClass_Model)">
</sbm-form-control>
@* Derivative *@
<sbm-form-control
label="@Localiser["label.derivative"]"
name-prefix="@NamePrefix" control-name-suffix="Derivative"
control-type="input" binding-name="VehicleClass.Derivative"
input-type="text" max-length="@Model.GetControlMaxLength(SbmDbDfn.ColumnIdx.SaVehicleClass_Derivative)">
</sbm-form-control>
@* Caption *@
<sbm-form-control
label="@Localiser["label.caption"]"
name-prefix="@NamePrefix" control-name-suffix="Caption"
control-type="input" binding-name="VehicleClass.Caption"
input-type="text" max-length="@Model.GetControlMaxLength(SbmDbDfn.ColumnIdx.SaVehicleClass_DescBrief)">
</sbm-form-control>
@* Status *@
<sbm-form-control
label="@Localiser["label.status"]" required="true"
name-prefix="@NamePrefix" form-control-name-suffix="Status" control-name-suffix="StatusCode"
control-type="select" binding-name="VehicleClass.StatusCode">
</sbm-form-control>
@* Notes *@
<sbm-form-control
label="@Localiser["label.notes"]"
name-prefix="@NamePrefix" control-name-suffix="Notes"
control-type="input" binding-name="VehicleClass.Notes"
input-type="textarea" max-length="@Model.GetControlMaxLength(SbmDbDfn.ColumnIdx.SaVehicleClass_Notes)">
</sbm-form-control>
}
<div class="spacer2"></div>
</div>