2011-11-13 23:51:15 +03:00
|
|
|
@model NzbDrone.Core.Repository.NewznabDefinition
|
|
|
|
@using NzbDrone.Web.Helpers
|
|
|
|
@{
|
|
|
|
Layout = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@using (Html.BeginCollectionItem("NewznabDefinitions"))
|
|
|
|
{
|
|
|
|
var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_');
|
|
|
|
|
|
|
|
<div class="providerSection" id="provider_@(Model.Id)">
|
|
|
|
<div class="providerHeader">
|
|
|
|
<span class="titleText" id="title_@(Model.Id)">
|
|
|
|
@Model.Name
|
|
|
|
</span>
|
2012-05-04 18:30:30 +03:00
|
|
|
@if(!Model.BuiltIn)
|
|
|
|
{
|
|
|
|
<a href="#" id="@Model.Id" class="deleteProvider" onclick="deleteProvider('@(Model.Id)'); return false;">
|
|
|
|
<img src="../../Content/Images/close.png" alt="Delete" width="22px" height="22px" /></a>
|
|
|
|
}
|
2011-11-13 23:51:15 +03:00
|
|
|
</div>
|
|
|
|
<div class="providerOptions">
|
|
|
|
@Html.Label("Enabled")
|
|
|
|
@Html.CheckBoxFor(m => m.Enable)
|
|
|
|
|
|
|
|
@Html.LabelFor(x => x.Name)
|
|
|
|
@Html.TextBoxFor(x => x.Name, new {@class = "providerName_textbox"})
|
2012-05-04 18:30:30 +03:00
|
|
|
|
|
|
|
@if(!Model.BuiltIn)
|
|
|
|
{
|
|
|
|
@Html.LabelFor(x => x.Url)
|
|
|
|
@Html.TextBoxFor(m => m.Url)
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
|
|
|
@Html.LabelFor(x => x.Url)
|
2012-05-04 21:12:14 +03:00
|
|
|
@Html.TextBox("DisabledIndexer", Model.Url, new { disabled = "disabled" })
|
|
|
|
@Html.HiddenFor(m => m.Url)
|
2012-05-04 18:30:30 +03:00
|
|
|
}
|
2011-11-13 23:51:15 +03:00
|
|
|
|
|
|
|
@Html.LabelFor(x => x.ApiKey)
|
|
|
|
@Html.TextBoxFor(m => m.ApiKey)
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@Html.HiddenFor(x => x.Id, new {@class = "newznabProviderId"})
|
|
|
|
@Html.Hidden("cleanId", idClean, new {@class = "cleanId"})
|
|
|
|
</div>
|
|
|
|
}
|