@model NzbDrone.Core.Repository.Quality.QualityProfile @using System.Collections @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 selectable = String.Format("{0}_selectable", idClean); string allowedStringName = String.Format("{0}_AllowedString", 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)
@Html.LabelFor(x => x.Cutoff)
@Html.DropDownListFor(m => m.Cutoff, new SelectList(ViewData["Qualities"] as IEnumerable, Model.Cutoff))
@Html.ValidationMessageFor(x => x.Cutoff)
    @{var qualitiesList = (List)ViewData["Qualities"];} @for (int i = 0; i < qualitiesList.Count(); i++) { if (Model.Allowed != null) { if (Model.Allowed.Contains(qualitiesList[i])) {
  1. @Html.Label(qualitiesList[i].ToString())
  2. continue; } }
  3. @Html.Label(qualitiesList[i].ToString())
  4. }
@Html.HiddenFor(x => x.QualityProfileId) @Html.HiddenFor(x => x.UserProfile) @Html.HiddenFor(m => m.AllowedString)
}