More layout changes for Download Settings to get validation looking better.

pull/4/head
markus101 14 years ago
parent 6e66a7a27f
commit 3a9f053a17

@ -173,11 +173,18 @@ hr
} }
/* Config Pages */ /* Config Pages */
.config-section
{
width: 550px;
display: block;
padding-bottom: 25px;
}
.config-group .config-group
{ {
width:300px; width:300px;
display: block; display: block;
padding-bottom: 25px; float: left;
} }
.config-title .config-title
@ -190,16 +197,19 @@ hr
.config-value .config-value
{ {
float: right; float: right;
} }
.config-validation .config-validation
{ {
color: Red;
float: right;
} }
.sub-field .sub-field
{ {
width: 50%; width: 70%;
margin-top: 10px;
margin-bottom: 10px;
} }
input[type="text"] input[type="text"]

@ -284,8 +284,9 @@ namespace NzbDrone.Web.Controllers
} }
} }
//ViewData["viewName"] = "Downloads"; if (Request.IsAjaxRequest())
//return View("Index", data); return Content("Error Saving Settings, please fix any errors");
return Content("Error Saving Settings, please fix any errors"); return Content("Error Saving Settings, please fix any errors");
} }

@ -31,7 +31,7 @@
{%> {%>
<%: Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") %> <%: Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.") %>
<fieldset > <fieldset>
<legend>Download Settings</legend> <legend>Download Settings</legend>
<%--//Sync Frequency <%--//Sync Frequency
//Download Propers? //Download Propers?
@ -47,77 +47,94 @@
<fieldset class="sub-field"> <fieldset class="sub-field">
<legend>Usenet Variables</legend> <legend>Usenet Variables</legend>
<div class="config-group"> <div class="config-section">
<div class="config-title"><%= Html.LabelFor(m => m.SyncFrequency) %></div> <div class="config-group">
<div class="config-value"><%= Html.TextBoxFor(m => m.SyncFrequency)%></div> <div class="config-title"><%= Html.LabelFor(m => m.SyncFrequency) %></div>
<div class="config-value"><%= Html.TextBoxFor(m => m.SyncFrequency)%></div>
</div>
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SyncFrequency)%></div> <div class="config-validation"><%= Html.ValidationMessageFor(m => m.SyncFrequency)%></div>
</div> </div>
<div class="config-group"> <div class="config-section">
<div class="config-title"><%= Html.LabelFor(m => m.DownloadPropers)%></div> <div class="config-group">
<div class="config-value"><%= Html.CheckBoxFor(m => m.DownloadPropers)%></div> <div class="config-title"><%= Html.LabelFor(m => m.DownloadPropers)%></div>
<div class="config-value"><%= Html.CheckBoxFor(m => m.DownloadPropers)%></div>
</div>
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.DownloadPropers)%></div> <div class="config-validation"><%= Html.ValidationMessageFor(m => m.DownloadPropers)%></div>
</div> </div>
<div class="config-group"> <div class="config-section">
<div class="config-title"><%= Html.LabelFor(m => m.Retention)%></div> <div class="config-group">
<div class="config-value"><%= Html.TextBoxFor(m => m.Retention)%></div> <div class="config-title"><%= Html.LabelFor(m => m.Retention)%></div>
<div class="config-value"><%= Html.TextBoxFor(m => m.Retention)%></div>
</div>
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.Retention)%></div> <div class="config-validation"><%= Html.ValidationMessageFor(m => m.Retention)%></div>
</div> </div>
</fieldset> </fieldset>
<br />
<fieldset class="sub-field"> <fieldset class="sub-field">
<legend>SABnzbd</legend> <legend>SABnzbd</legend>
<div class="config-group"> <div class="config-section">
<div class="config-title"><%= Html.LabelFor(m => m.SabHost)%></div> <div class="config-group">
<div class="config-value"><%= Html.TextBoxFor(m => m.SabHost)%></div> <div class="config-title"><%= Html.LabelFor(m => m.SabHost)%></div>
<div class="config-value"><%= Html.TextBoxFor(m => m.SabHost)%></div>
</div>
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabHost)%></div> <div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabHost)%></div>
</div> </div>
<div class="config-group"> <div class="config-section">
<div class="config-title"><%= Html.LabelFor(m => m.SabPort)%></div> <div class="config-group">
<div class="config-value"><%= Html.TextBoxFor(m => m.SabPort)%></div> <div class="config-title"><%= Html.LabelFor(m => m.SabPort)%></div>
<div class="config-value"><%= Html.TextBoxFor(m => m.SabPort)%></div>
</div>
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabPort)%></div> <div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabPort)%></div>
</div> </div>
<div class="config-group"> <div class="config-section">
<div class="config-title"><%= Html.LabelFor(m => m.SabApiKey)%></div> <div class="config-group">
<div class="config-value"><%= Html.TextBoxFor(m => m.SabApiKey)%></div> <div class="config-title"><%= Html.LabelFor(m => m.SabApiKey)%></div>
<div class="config-value"><%= Html.TextBoxFor(m => m.SabApiKey)%></div>
</div>
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabApiKey)%></div> <div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabApiKey)%></div>
</div> </div>
<div class="config-group"> <div class="config-section">
<div class="config-title"><%= Html.LabelFor(m => m.SabUsername)%></div> <div class="config-group">
<div class="config-value"><%= Html.TextBoxFor(m => m.SabUsername)%></div> <div class="config-title"><%= Html.LabelFor(m => m.SabUsername)%></div>
<div class="config-value"><%= Html.TextBoxFor(m => m.SabUsername)%></div>
</div>
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabUsername)%></div> <div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabUsername)%></div>
</div> </div>
<div class="config-group"> <div class="config-section">
<div class="config-title"><%= Html.LabelFor(m => m.SabPassword)%></div> <div class="config-group">
<div class="config-value"><%= Html.TextBoxFor(m => m.SabPassword)%></div> <div class="config-title"><%= Html.LabelFor(m => m.SabPassword)%></div>
<div class="config-value"><%= Html.TextBoxFor(m => m.SabPassword)%></div>
</div>
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabPassword)%></div> <div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabPassword)%></div>
</div> </div>
<div class="config-group"> <div class="config-section">
<div class="config-title"><%= Html.LabelFor(m => m.SabCategory)%></div> <div class="config-group">
<div class="config-value"><%= Html.TextBoxFor(m => m.SabCategory)%></div> <div class="config-title"><%= Html.LabelFor(m => m.SabCategory)%></div>
<div class="config-value"><%= Html.TextBoxFor(m => m.SabCategory)%></div>
</div>
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabCategory)%></div> <div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabCategory)%></div>
</div> </div>
<div class="config-group"> <div class="config-section">
<div class="config-title"><%= Html.LabelFor(m => m.SabPriority) %></div> <div class="config-group">
<div class="config-value"><%= Html.DropDownListFor(m => m.SabPriority, Model.PrioritySelectList) %></div> <div class="config-title"><%= Html.LabelFor(m => m.SabPriority) %></div>
<div class="config-value"><%= Html.DropDownListFor(m => m.SabPriority, Model.PrioritySelectList) %></div>
</div>
<div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabCategory)%></div> <div class="config-validation"><%= Html.ValidationMessageFor(m => m.SabCategory)%></div>
</div> </div>
</fieldset> </fieldset>
<p>
<input type="submit" value="Save" class="submitButton"/> <input type="submit" value="Save" class="submitButton"/>
</p>
<% } %>
</fieldset> </fieldset>
<% } %>
<div id="result"></div> <div id="result"></div>
Loading…
Cancel
Save