<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <%@ Import Namespace="NzbDrone.Web.Helpers" %> <%@ Import Namespace="NzbDrone.Core.Repository.Quality" %> <% using (Html.BeginCollectionItem("UserProfiles")) { %>
<%----%> <%= Html.TextBoxFor(m => m.AllowedString, new { @id = "allowedString", @style = "display:none" })%>
<%= Html.LabelFor(x => x.Name)%>
<%= Html.TextBoxFor(x => x.Name)%>
<%= Html.ValidationMessageFor(x => x.Name)%>

<%= Html.TextBoxFor(x => x.ProfileId, new { @style = "display:none" })%> <%= Html.CheckBoxFor(x => x.UserProfile, new { @style = "display:none" })%>

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.RenderPartial("ProfileAllowedQualities", Model.Allowed[i]) %>--%>
  • <% } %>

<% } %>