LocalGovIMS_localgov-ims/src/Admin/Views/Office/Edit.cshtml
@model Admin.Models.Office.EditViewModel
@{
    ViewBag.Title = "Edit Office";
}

@section Messages {
    @if (TempData.ContainsKey("Message") && TempData["Message"] != null) { Html.RenderPartial("_Message", TempData["Message"]); }
}

@section Header { @Model.Name }

@section Subheader { Office details }


@using (Html.BeginForm("Edit", "Office", FormMethod.Post))
{
<div>

    @Html.HiddenFor(m => m.Code)

    <div class="row mb-3">
        <div class="col-12 col-sm-6 col-md-5 col-lg-4">
            @Html.LabelFor(m => m.Code, new { @class = "form-label" })
            <div class="form-label">
                @Html.DisplayFor(m => m.Code, new { @class = "form-control" })
            </div>
        </div>
    </div>

    <div class="row mb-3">
        <div class="col-12 col-sm-6 col-md-5 col-lg-4">
            @Html.LabelFor(m => m.Name, new { @class = "form-label" })
            @Html.TextBoxFor(m => m.Name, new { @class = "form-control" })
            <div class="form__element--error">
                @Html.ValidationMessageFor(m => m.Name)
            </div>
        </div>
    </div>

    <input type="submit" value="Save" class="btn btn-primary" />
    @Html.ActionLink("Back", "Back", "Office", null, new { @class = "btn btn-secondary" })

</div>
}
