@{    
    Layout = null;
}

@model Parameter
<div class="row">

    <form asp-action="AddOrEdit" asp-route-id="@Model.Id" onsubmit="return jQueryAjaxPost(this);">

        <input hidden asp-for="Id" placeholder="ID" class="form-control" />
        
        <input hidden asp-for="Disabled" 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="Name" class="control-label"></label>
            <input asp-for="Name" class="form-control" id="ctrlToFocus" />
            <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="OrganizationId" class="control-label"></label>
            <select asp-for="OrganizationId" asp-items="@(new SelectList(Model.Organizations, "Id", "FullShortName"))" class="form-control"></select>
        </div>

        <div class="form-group">
            <label asp-for="PlcId" class="control-label"></label>
            <select asp-for="PlcId" asp-items="@(new SelectList(Model.Plcs, "Id", "Name"))" class="form-control"></select>
        </div>

        <div class="form-group">
            <label asp-for="DbNo" class="control-label"></label>
            <input asp-for="DbNo" class="form-control" />
            <span asp-validation-for="DbNo" class="text-danger"></span>
        </div>

        <div class="form-group">
            <label asp-for="DbStart" class="control-label"></label>
            <input asp-for="DbStart" class="form-control" />
            <span asp-validation-for="DbStart" class="text-danger"></span>
        </div>

        <div class="form-group">
            <label asp-for="DbSize" class="control-label"></label>
            <input asp-for="DbSize" class="form-control" />
            <span asp-validation-for="DbSize" class="text-danger"></span>
        </div>

        <div class="form-group">
            <label asp-for="DataType" class="control-label"></label>
            <select asp-for="DataType" asp-items="Html.GetEnumSelectList<FSI.BT.IR.Plc.Settings.Log.Models.DataType>()" class="form-control"></select>
            <span asp-validation-for="DataType" class="text-danger"></span>
        </div>

        <div class="form-group">
            <label asp-for="DefaultValue" class="control-label"></label>
            <input asp-for="DefaultValue" class="form-control" />
            <span asp-validation-for="DefaultValue" class="text-danger"></span>
        </div>

        <hr />
        <div class="form-group">
            <input type="submit" value="Submit" class="btn btn-primary btn-block" />
        </div>

    </form>

</div>

