1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-30 19:56:54 +00:00
Sonarr/NzbDrone.Web/Views/Settings/General.ascx
markus101 da979639ba More config pages have been added. AJAX to save. Order with jquery sortable.
Some RssFeed Parsing has been implemented, it does not currently download items, still need to perform a more verbose episode check.
2011-01-28 22:10:22 -08:00

45 lines
No EOL
1.6 KiB
Text

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NzbDrone.Web.Models.SettingsModel>" %>
<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>
<% using (Html.BeginForm("SaveGeneral", "Settings", FormMethod.Post, new { id = "form", name = "form" }))
{%>
<%: Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") %>
<fieldset>
<legend>General</legend>
<div class="editor-label">
<%= Html.LabelFor(model => model.TvFolder) %>
</div>
<div class="editor-field">
<%= Html.TextBoxFor(model => model.TvFolder) %>
<%= Html.ValidationMessageFor(model => model.TvFolder) %>
</div>
<p>
<input type="submit" value="Save" />
</p>
</fieldset>
<% } Html.EndForm();%>
<div id="result"></div>