2011-02-11 01:22:29 +00:00
|
|
|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NzbDrone.Web.Models.DownloadSettingsModel>" %>
|
2011-01-29 06:10:22 +00:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function () {
|
|
|
|
var options = {
|
|
|
|
target: '#result',
|
|
|
|
beforeSubmit: showRequest,
|
|
|
|
success: showResponse,
|
|
|
|
type: 'post',
|
|
|
|
resetForm: false
|
|
|
|
};
|
|
|
|
$('#form').ajaxForm(options);
|
|
|
|
});
|
|
|
|
|
|
|
|
function showRequest(formData, jqForm, options) {
|
|
|
|
$("#result").empty().html('Saving...');
|
|
|
|
$("#form :input").attr("disabled", true);
|
|
|
|
}
|
|
|
|
|
|
|
|
function showResponse(responseText, statusText, xhr, $form) {
|
|
|
|
$("#result").empty().html(responseText);
|
|
|
|
$("#form :input").attr("disabled", false);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2011-02-11 01:22:29 +00:00
|
|
|
<% Html.EnableClientValidation(); %>
|
|
|
|
|
2011-01-29 06:10:22 +00:00
|
|
|
<% using (Html.BeginForm("SaveDownloads", "Settings", FormMethod.Post, new { id = "form", name = "form" }))
|
|
|
|
{%>
|
2011-02-12 06:10:38 +00:00
|
|
|
<%--<%: Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") %>--%>
|
2011-01-29 06:10:22 +00:00
|
|
|
|
2011-02-11 07:48:40 +00:00
|
|
|
<fieldset>
|
2011-01-29 06:10:22 +00:00
|
|
|
<legend>Download Settings</legend>
|
|
|
|
<%--//Sync Frequency
|
|
|
|
//Download Propers?
|
|
|
|
//Retention
|
|
|
|
//SAB Host/IP
|
|
|
|
//SAB Port
|
|
|
|
//SAB APIKey
|
|
|
|
//SAB Username
|
|
|
|
//SAB Password
|
|
|
|
//SAB Category
|
|
|
|
//SAB Priority--%>
|
|
|
|
|
2011-01-31 07:42:44 +00:00
|
|
|
<fieldset class="sub-field">
|
|
|
|
<legend>Usenet Variables</legend>
|
2011-01-29 06:10:22 +00:00
|
|
|
|
2011-02-11 07:48:40 +00:00
|
|
|
<div class="config-section">
|
|
|
|
<div class="config-group">
|
|
|
|
<div class="config-title"><%= Html.LabelFor(m => m.SyncFrequency) %></div>
|
|
|
|
<div class="config-value"><%= Html.TextBoxFor(m => m.SyncFrequency)%></div>
|
|
|
|
</div>
|
2011-01-31 07:42:44 +00:00
|
|
|
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SyncFrequency)%></div>
|
|
|
|
</div>
|
2011-02-11 07:48:40 +00:00
|
|
|
|
|
|
|
<div class="config-section">
|
|
|
|
<div class="config-group">
|
|
|
|
<div class="config-title"><%= Html.LabelFor(m => m.DownloadPropers)%></div>
|
|
|
|
<div class="config-value"><%= Html.CheckBoxFor(m => m.DownloadPropers)%></div>
|
|
|
|
|
|
|
|
</div>
|
2011-01-31 07:42:44 +00:00
|
|
|
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.DownloadPropers)%></div>
|
|
|
|
</div>
|
2011-01-29 06:10:22 +00:00
|
|
|
|
2011-02-11 07:48:40 +00:00
|
|
|
<div class="config-section">
|
|
|
|
<div class="config-group">
|
|
|
|
<div class="config-title"><%= Html.LabelFor(m => m.Retention)%></div>
|
|
|
|
<div class="config-value"><%= Html.TextBoxFor(m => m.Retention)%></div>
|
|
|
|
</div>
|
2011-01-31 07:42:44 +00:00
|
|
|
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.Retention)%></div>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
2011-01-29 06:10:22 +00:00
|
|
|
|
2011-01-31 07:42:44 +00:00
|
|
|
<fieldset class="sub-field">
|
|
|
|
<legend>SABnzbd</legend>
|
|
|
|
|
2011-02-11 07:48:40 +00:00
|
|
|
<div class="config-section">
|
|
|
|
<div class="config-group">
|
|
|
|
<div class="config-title"><%= Html.LabelFor(m => m.SabHost)%></div>
|
|
|
|
<div class="config-value"><%= Html.TextBoxFor(m => m.SabHost)%></div>
|
|
|
|
</div>
|
2011-01-31 07:42:44 +00:00
|
|
|
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabHost)%></div>
|
|
|
|
</div>
|
|
|
|
|
2011-02-11 07:48:40 +00:00
|
|
|
<div class="config-section">
|
|
|
|
<div class="config-group">
|
|
|
|
<div class="config-title"><%= Html.LabelFor(m => m.SabPort)%></div>
|
|
|
|
<div class="config-value"><%= Html.TextBoxFor(m => m.SabPort)%></div>
|
|
|
|
</div>
|
2011-01-31 07:42:44 +00:00
|
|
|
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabPort)%></div>
|
|
|
|
</div>
|
|
|
|
|
2011-02-11 07:48:40 +00:00
|
|
|
<div class="config-section">
|
|
|
|
<div class="config-group">
|
|
|
|
<div class="config-title"><%= Html.LabelFor(m => m.SabApiKey)%></div>
|
|
|
|
<div class="config-value"><%= Html.TextBoxFor(m => m.SabApiKey)%></div>
|
|
|
|
</div>
|
2011-01-31 07:42:44 +00:00
|
|
|
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabApiKey)%></div>
|
|
|
|
</div>
|
|
|
|
|
2011-02-11 07:48:40 +00:00
|
|
|
<div class="config-section">
|
|
|
|
<div class="config-group">
|
|
|
|
<div class="config-title"><%= Html.LabelFor(m => m.SabUsername)%></div>
|
|
|
|
<div class="config-value"><%= Html.TextBoxFor(m => m.SabUsername)%></div>
|
|
|
|
</div>
|
2011-01-31 07:42:44 +00:00
|
|
|
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabUsername)%></div>
|
|
|
|
</div>
|
|
|
|
|
2011-02-11 07:48:40 +00:00
|
|
|
<div class="config-section">
|
|
|
|
<div class="config-group">
|
|
|
|
<div class="config-title"><%= Html.LabelFor(m => m.SabPassword)%></div>
|
|
|
|
<div class="config-value"><%= Html.TextBoxFor(m => m.SabPassword)%></div>
|
|
|
|
</div>
|
2011-01-31 07:42:44 +00:00
|
|
|
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabPassword)%></div>
|
|
|
|
</div>
|
|
|
|
|
2011-02-11 07:48:40 +00:00
|
|
|
<div class="config-section">
|
|
|
|
<div class="config-group">
|
|
|
|
<div class="config-title"><%= Html.LabelFor(m => m.SabCategory)%></div>
|
|
|
|
<div class="config-value"><%= Html.TextBoxFor(m => m.SabCategory)%></div>
|
|
|
|
</div>
|
2011-01-31 07:42:44 +00:00
|
|
|
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabCategory)%></div>
|
|
|
|
</div>
|
|
|
|
|
2011-02-11 07:48:40 +00:00
|
|
|
<div class="config-section">
|
|
|
|
<div class="config-group">
|
|
|
|
<div class="config-title"><%= Html.LabelFor(m => m.SabPriority) %></div>
|
|
|
|
<div class="config-value"><%= Html.DropDownListFor(m => m.SabPriority, Model.PrioritySelectList) %></div>
|
|
|
|
</div>
|
2011-02-11 01:22:29 +00:00
|
|
|
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabCategory)%></div>
|
2011-01-31 07:42:44 +00:00
|
|
|
</div>
|
|
|
|
</fieldset>
|
2011-01-29 06:10:22 +00:00
|
|
|
|
2011-01-31 07:42:44 +00:00
|
|
|
<input type="submit" value="Save" class="submitButton"/>
|
2011-02-11 07:48:40 +00:00
|
|
|
|
|
|
|
<% } %>
|
2011-01-29 06:10:22 +00:00
|
|
|
</fieldset>
|
|
|
|
<div id="result"></div>
|