From 3a9f053a1719613ef94ddafa0890a7043b9cbb05 Mon Sep 17 00:00:00 2001 From: markus101 Date: Thu, 10 Feb 2011 23:48:40 -0800 Subject: [PATCH] More layout changes for Download Settings to get validation looking better. --- NzbDrone.Web/Content/style.css | 18 +++- .../Controllers/SettingsController.cs | 5 +- NzbDrone.Web/Views/Settings/Downloads.ascx | 93 +++++++++++-------- 3 files changed, 72 insertions(+), 44 deletions(-) diff --git a/NzbDrone.Web/Content/style.css b/NzbDrone.Web/Content/style.css index f952f5a7a..2e401361f 100644 --- a/NzbDrone.Web/Content/style.css +++ b/NzbDrone.Web/Content/style.css @@ -173,11 +173,18 @@ hr } /* Config Pages */ +.config-section +{ + width: 550px; + display: block; + padding-bottom: 25px; +} + .config-group { width:300px; display: block; - padding-bottom: 25px; + float: left; } .config-title @@ -190,16 +197,19 @@ hr .config-value { float: right; - } .config-validation { - + color: Red; + float: right; } + .sub-field { - width: 50%; + width: 70%; + margin-top: 10px; + margin-bottom: 10px; } input[type="text"] diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index f08b63b83..ef9b2fc0c 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -284,8 +284,9 @@ namespace NzbDrone.Web.Controllers } } - //ViewData["viewName"] = "Downloads"; - //return View("Index", data); + if (Request.IsAjaxRequest()) + return Content("Error Saving Settings, please fix any errors"); + return Content("Error Saving Settings, please fix any errors"); } diff --git a/NzbDrone.Web/Views/Settings/Downloads.ascx b/NzbDrone.Web/Views/Settings/Downloads.ascx index 84ed0ea3d..f3b62eca5 100644 --- a/NzbDrone.Web/Views/Settings/Downloads.ascx +++ b/NzbDrone.Web/Views/Settings/Downloads.ascx @@ -31,7 +31,7 @@ {%> <%: Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") %> -
+
Download Settings <%--//Sync Frequency //Download Propers? @@ -47,77 +47,94 @@
Usenet Variables -
-
<%= Html.LabelFor(m => m.SyncFrequency) %>
-
<%= Html.TextBoxFor(m => m.SyncFrequency)%>
+
+
+
<%= Html.LabelFor(m => m.SyncFrequency) %>
+
<%= Html.TextBoxFor(m => m.SyncFrequency)%>
+
<%= Html.ValidationMessageFor(m => m.SyncFrequency)%>
- -
-
<%= Html.LabelFor(m => m.DownloadPropers)%>
-
<%= Html.CheckBoxFor(m => m.DownloadPropers)%>
+ +
+
+
<%= Html.LabelFor(m => m.DownloadPropers)%>
+
<%= Html.CheckBoxFor(m => m.DownloadPropers)%>
+ +
<%= Html.ValidationMessageFor(m => m.DownloadPropers)%>
-
-
<%= Html.LabelFor(m => m.Retention)%>
-
<%= Html.TextBoxFor(m => m.Retention)%>
+
+
+
<%= Html.LabelFor(m => m.Retention)%>
+
<%= Html.TextBoxFor(m => m.Retention)%>
+
<%= Html.ValidationMessageFor(m => m.Retention)%>
-
-
SABnzbd -
-
<%= Html.LabelFor(m => m.SabHost)%>
-
<%= Html.TextBoxFor(m => m.SabHost)%>
+
+
+
<%= Html.LabelFor(m => m.SabHost)%>
+
<%= Html.TextBoxFor(m => m.SabHost)%>
+
<%= Html.ValidationMessageFor(m => m.SabHost)%>
-
-
<%= Html.LabelFor(m => m.SabPort)%>
-
<%= Html.TextBoxFor(m => m.SabPort)%>
+
+
+
<%= Html.LabelFor(m => m.SabPort)%>
+
<%= Html.TextBoxFor(m => m.SabPort)%>
+
<%= Html.ValidationMessageFor(m => m.SabPort)%>
-
-
<%= Html.LabelFor(m => m.SabApiKey)%>
-
<%= Html.TextBoxFor(m => m.SabApiKey)%>
+
+
+
<%= Html.LabelFor(m => m.SabApiKey)%>
+
<%= Html.TextBoxFor(m => m.SabApiKey)%>
+
<%= Html.ValidationMessageFor(m => m.SabApiKey)%>
-
-
<%= Html.LabelFor(m => m.SabUsername)%>
-
<%= Html.TextBoxFor(m => m.SabUsername)%>
+
+
+
<%= Html.LabelFor(m => m.SabUsername)%>
+
<%= Html.TextBoxFor(m => m.SabUsername)%>
+
<%= Html.ValidationMessageFor(m => m.SabUsername)%>
-
-
<%= Html.LabelFor(m => m.SabPassword)%>
-
<%= Html.TextBoxFor(m => m.SabPassword)%>
+
+
+
<%= Html.LabelFor(m => m.SabPassword)%>
+
<%= Html.TextBoxFor(m => m.SabPassword)%>
+
<%= Html.ValidationMessageFor(m => m.SabPassword)%>
-
-
<%= Html.LabelFor(m => m.SabCategory)%>
-
<%= Html.TextBoxFor(m => m.SabCategory)%>
+
+
+
<%= Html.LabelFor(m => m.SabCategory)%>
+
<%= Html.TextBoxFor(m => m.SabCategory)%>
+
<%= Html.ValidationMessageFor(m => m.SabCategory)%>
-
-
<%= Html.LabelFor(m => m.SabPriority) %>
-
<%= Html.DropDownListFor(m => m.SabPriority, Model.PrioritySelectList) %>
+
+
+
<%= Html.LabelFor(m => m.SabPriority) %>
+
<%= Html.DropDownListFor(m => m.SabPriority, Model.PrioritySelectList) %>
+
<%= Html.ValidationMessageFor(m => m.SabCategory)%>
-

-

+ + <% } %>
- -<% } %>
\ No newline at end of file