@model NzbDrone.Core.Repository.Quality.QualityProfile @using NzbDrone.Core.Repository.Quality @using NzbDrone.Web.Helpers @{ Layout = null; } @using (Html.BeginCollectionItem("Profiles")) { var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_'); var ugly = ViewData.TemplateInfo.HtmlFieldPrefix; string sortable1 = String.Format("{0}_sortable1", idClean); string sortable2 = String.Format("{0}_sortable2", idClean); string allowedStringName = String.Format("{0}_AllowedString", idClean); string connectedSortable = String.Format("connected{0}", idClean); string title = String.Format("{0}_Title", idClean); string nameBox = String.Format("{0}_Name", idClean); string cutoff = String.Format("{0}.Cutoff", ugly);

@{Html.DisplayTextFor(m => m.Name);}

Delete
@Html.LabelFor(x => x.Name)
@Html.TextBoxFor(x => x.Name, new { maxlength = 16})
@Html.ValidationMessageFor(x => x.Name)

Allowed

    @if (Model.Allowed != null) { for (int i = 0; i < Model.Allowed.Count(); i++) {
  • @Html.RadioButtonFor(x => x.Cutoff, Model.Allowed[i]) @Html.DisplayTextFor(c => c.Allowed[i])
  • } }

Not-Allowed

    @{var qualitiesList = (List)ViewData["Qualities"];} @for (int i = 0; i < qualitiesList.Count(); i++) { //Skip Unknown and any item that is in the allowed list //if (qualitiesList[i].ToString() == "Unknown") //{ // continue; //} if (Model.Allowed != null) { if (Model.Allowed.Contains(qualitiesList[i])) { continue; } }
  • @Html.RadioButtonFor(x => x.Cutoff, qualitiesList[i]) @Html.Label(qualitiesList[i].ToString())
  • }
@Html.ValidationMessageFor(x => x.Cutoff)
@Html.TextBoxFor(x => x.QualityProfileId, new { @style = "display:none" }) @Html.CheckBoxFor(x => x.UserProfile, new { @style = "display:none" }) @Html.TextBoxFor(m => m.AllowedString, new { @style = "display:none" })
}