@model ResourcesManager.Models.Reservation

@{
    ViewBag.Title = "Módosítás";
}

<h2>Foglalás</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <h4>Foglalás módosítás</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.ResourceId)


        <div class="form-group">
            *@Html.LabelFor(model => model.Begining, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                    @Html.EditorFor(model => model.Begining, new { htmlAttributes = new { @class = "form-control" } })
                    @Html.ValidationMessageFor(model => model.Begining, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            *@Html.LabelFor(model => model.End, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                    @Html.EditorFor(model => model.End, new { htmlAttributes = new { @class = "form-control" } })
                    @Html.ValidationMessageFor(model => model.End, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.User, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.User, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
                @Html.ValidationMessageFor(model => model.User, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Resource.Name, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Resource.Name, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
                @Html.ValidationMessageFor(model => model.Resource.AssetTag, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Resource.AssetTag, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Resource.AssetTag, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
                @Html.ValidationMessageFor(model => model.Resource.AssetTag, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Resource.Description, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Resource.Description, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
                @Html.ValidationMessageFor(model => model.Resource.Description, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Mentés" class="btn btn-primary" />
            </div>
        </div>
    </div>
}

<div>
    <a href="javascript:void(0);" onclick="history.go(-1);" class="btn btn-default">Vissza</a>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
