55 lines
1.9 KiB
Plaintext
55 lines
1.9 KiB
Plaintext
@model GODATA.Models.LogOnModel
|
|
@{
|
|
ViewBag.Title = System.Configuration.ConfigurationManager.AppSettings["Title"] + " | Log On"; Layout = null;
|
|
}
|
|
<div class="LoginHeading">Login</div>
|
|
@Html.ValidationSummary(true)
|
|
@using (Ajax.BeginForm("LogOn", "Account",
|
|
new AjaxOptions { HttpMethod = "Post", UpdateTargetId = "divLoginBox", OnBegin = "loginBegin", OnFailure = "loginFailure", OnSuccess = "loginSuccessful", LoadingElementId = "divLoadingElement" }))
|
|
{
|
|
@*<div style="height:15px; display:none;"> </div>
|
|
*@<div class="user">
|
|
@*@Html.LabelFor(m => m.UserName)*@
|
|
@Html.TextBoxFor(m => m.UserName, new { @class = "largeWidth" })
|
|
@Html.ValidationMessageFor(m => m.UserName)
|
|
</div>
|
|
<div class="clear">
|
|
</div>
|
|
<div class="userPassword">
|
|
@*@Html.LabelFor(m => m.Password)*@
|
|
@Html.PasswordFor(m => m.Password, new { @class = "largeWidth" })
|
|
@Html.ValidationMessageFor(m => m.Password)
|
|
</div>
|
|
<div class="clear">
|
|
</div>
|
|
|
|
<div class="submitArea">
|
|
<p>
|
|
<input type="submit" name="submit" value="Login" class="" id="submit" />
|
|
</p>
|
|
|
|
<div class="forgetPassword">
|
|
@Html.ActionLink("Forgot password?", "ForgotPassword", "Account")
|
|
@Html.Hidden("returnUrl", Request.QueryString["returnUrl"])
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<div class="clear"></div>
|
|
<script type="text/javascript">
|
|
function loginSuccessful(response) {
|
|
|
|
if (response && response.returnUrl) {
|
|
console.log(response.returnUrl);
|
|
//showLoadingMessage("Redirecting to your home page...");
|
|
window.location.href = response.returnUrl;
|
|
}
|
|
}
|
|
function loginBegin() {
|
|
$("#loginSubmit").attr("disabled", "disabled").addClass("disable");
|
|
}
|
|
$(document).ready(function () {
|
|
$("#UserName").focus();
|
|
});
|
|
</script>
|