Skip to content

Commit

Permalink
Login.cshtml DatabaseIssue condition was negated
Browse files Browse the repository at this point in the history
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
andrasfuchs committed Feb 11, 2015
1 parent 6446dc1 commit f1313dc
Showing 1 changed file with 45 additions and 45 deletions.
90 changes: 45 additions & 45 deletions src/FunnelWeb.Web/Areas/Admin/Views/Login/Login.cshtml
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>
}
}

0 comments on commit f1313dc

Please sign in to comment.