@model MusicStore.Models.Album

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

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

    <div class="form-horizontal">
        <h4>Album</h4>
        <hr />
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.AlbumId)

        <div class="form-group">
            @Html.LabelFor(model => model.GenreId, "GenreId", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("GenreId", String.Empty)
                @Html.ValidationMessageFor(model => model.GenreId)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ArtistId, "ArtistId", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("ArtistId", String.Empty)
                @Html.ValidationMessageFor(model => model.ArtistId)
            </div>
        </div>

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

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

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

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @*TODO : Until script helpers are available, adding script references manually*@
    @*@Scripts.Render("~/bundles/jqueryval")*@
    <script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>
}