@model NzbDrone.Core.Repository.NewznabDefinition
@using NzbDrone.Web.Helpers
@{
Layout = null;
}
@using (Html.BeginCollectionItem("NewznabDefinitions"))
{
var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_');
@Html.Label("Enabled")
@Html.CheckBoxFor(m => m.Enable)
@Html.LabelFor(x => x.Name)
@Html.TextBoxFor(x => x.Name, new {@class = "providerName_textbox"})
@if(!Model.BuiltIn)
{
@Html.LabelFor(x => x.Url)
@Html.TextBoxFor(m => m.Url)
}
else
{
@Html.LabelFor(x => x.Url)
@Html.TextBox("DisabledIndexer", Model.Url, new { disabled = "disabled" })
@Html.HiddenFor(m => m.Url)
}
@Html.LabelFor(x => x.ApiKey)
@Html.TextBoxFor(m => m.ApiKey)
@Html.HiddenFor(x => x.Id, new {@class = "newznabProviderId"})
@Html.Hidden("cleanId", idClean, new {@class = "cleanId"})
@Html.HiddenFor(m => m.BuiltIn)
}