-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Login.cshtml DatabaseIssue condition was negated
There is a condition where we check the DatabaseIssue property, but it was check to be true where false is the proper value (in Login.cshtml)
- Loading branch information
1 parent
6446dc1
commit f1313dc
Showing
1 changed file
with
45 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,58 @@ | ||
@model FunnelWeb.Web.Areas.Admin.Views.Login.LoginModel | ||
@{ | ||
ViewBag.Title = "Login"; | ||
Layout = "~/Areas/Admin/Views/Shared/_Private.cshtml"; | ||
ViewBag.Title = "Login"; | ||
Layout = "~/Areas/Admin/Views/Shared/_Private.cshtml"; | ||
} | ||
@if (Model.DatabaseConnectionIssue) | ||
{ | ||
<h1>Unable to connect to the database</h1> | ||
<p class='bad'>There is an error connecting to the database at the current time. Please try again later.</p> | ||
<h1>Unable to connect to the database</h1> | ||
<p class='bad'>There is an error connecting to the database at the current time. Please try again later.</p> | ||
} | ||
else if (Model.ConfigFileMissing ?? false) | ||
{ | ||
<h1>Config File Missing</h1> | ||
<p class='bad'>FunnelWeb uses the my.config file to store the administration username and password.</p> | ||
<h1>Config File Missing</h1> | ||
<p class='bad'>FunnelWeb uses the my.config file to store the administration username and password.</p> | ||
} | ||
else | ||
{ | ||
if (Model.DatabaseIssue ?? false) | ||
{ | ||
<h1>Database Issue</h1> | ||
<p class='bad'>The database used by your FunnelWeb installation is either offline, out of date or has not been configured correctly. To resolve this issue, you will need to log in with the credentials in your my.config file.</p> | ||
} | ||
else | ||
{ | ||
<h1>Login</h1> | ||
<p class='good'>To administer this site, log in using the form below.</p> | ||
} | ||
if (Model.DatabaseIssue ?? true) | ||
{ | ||
<h1>Database Issue</h1> | ||
<p class='bad'>The database used by your FunnelWeb installation is either offline, out of date or has not been configured correctly. To resolve this issue, you will need to log in with the credentials in your my.config file.</p> | ||
} | ||
else | ||
{ | ||
<h1>Login</h1> | ||
<p class='good'>To administer this site, log in using the form below.</p> | ||
} | ||
|
||
@Html.ValidationSummary("Login unsuccessful") | ||
using (Html.BeginForm("Login", "Login", FormMethod.Post, new { Area = "Admin" })) | ||
{ | ||
<text> | ||
<div class="form-body"> | ||
<div class="editor-label"> | ||
@Html.LabelFor(m => m.Username) | ||
</div> | ||
<div class="editor-field"> | ||
@Html.TextBoxFor(m => m.Username, Html.AttributesFor(m => m.Username)) | ||
@Html.ValidationMessageFor(m => m.Username) | ||
</div> | ||
<div class="editor-label"> | ||
@Html.LabelFor(m => m.Password) | ||
</div> | ||
<div class="editor-field"> | ||
@Html.PasswordFor(m => m.Password, Html.AttributesFor(m => m.Password)) | ||
@Html.ValidationMessageFor(m => m.Password) | ||
</div> | ||
@Html.HiddenFor(m => m.DatabaseIssue) | ||
@Html.HiddenFor(m => m.ReturnUrl) | ||
<div class="editor-label"> | ||
</div> | ||
<div class="editor-field"> | ||
<input type="submit" id="submit" class="submit" value="Submit" /> | ||
</div> | ||
</div> | ||
</text> | ||
} | ||
@Html.ValidationSummary("Login unsuccessful") | ||
using (Html.BeginForm("Login", "Login", FormMethod.Post, new { Area = "Admin" })) | ||
{ | ||
<text> | ||
<div class="form-body"> | ||
<div class="editor-label"> | ||
@Html.LabelFor(m => m.Username) | ||
</div> | ||
<div class="editor-field"> | ||
@Html.TextBoxFor(m => m.Username, Html.AttributesFor(m => m.Username)) | ||
@Html.ValidationMessageFor(m => m.Username) | ||
</div> | ||
<div class="editor-label"> | ||
@Html.LabelFor(m => m.Password) | ||
</div> | ||
<div class="editor-field"> | ||
@Html.PasswordFor(m => m.Password, Html.AttributesFor(m => m.Password)) | ||
@Html.ValidationMessageFor(m => m.Password) | ||
</div> | ||
@Html.HiddenFor(m => m.DatabaseIssue) | ||
@Html.HiddenFor(m => m.ReturnUrl) | ||
<div class="editor-label"> | ||
</div> | ||
<div class="editor-field"> | ||
<input type="submit" id="submit" class="submit" value="Submit" /> | ||
</div> | ||
</div> | ||
</text> | ||
} | ||
} |