<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <%@ Import Namespace="NzbDrone.Web.Helpers" %> <%@ Import Namespace="NzbDrone.Core.Repository.Quality" %> <% using (Html.BeginCollectionItem("UserProfiles")) { %> <% var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_'); 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); %>

<%= Html.DisplayTextFor(m => m.Name) %>

Delete
<%= Html.LabelFor(x => x.Name)%>
<%= Html.TextBoxFor(x => x.Name)%>
<%= 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.ProfileId, new { @style = "display:none" })%> <%= Html.CheckBoxFor(x => x.UserProfile, new { @style = "display:none" })%> <%= Html.TextBoxFor(m => m.AllowedString, new { @style = "display:none" })%>
<% } %>