Got a login
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
@using Yavsc.ViewModels.Account
|
||||
@model SignInViewModel
|
||||
@model SignInModel
|
||||
@{
|
||||
ViewData["Title"] = "Log in";
|
||||
}
|
||||
@ -11,20 +11,19 @@
|
||||
<hr/>
|
||||
|
||||
<h2 class="lead text-left">Use a local account to log in</h2>
|
||||
<form action="@Constants.LoginPath" method="post" class="form-horizontal" role="form">
|
||||
|
||||
<form asp-action="SignIn" class="form-horizontal" role="form">
|
||||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label for="UserName" class="col-md-2 control-label">UserName</label>
|
||||
<label for="EMail" class="col-md-2 control-label">EMail</label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="UserName" class="form-control" />
|
||||
<span asp-validation-for="UserName" class="text-danger"></span>
|
||||
<input asp-for="EMail" class="form-control" autocomplete="email" aria-required="true" placeholder="name@example.com" />
|
||||
<span asp-validation-for="EMail" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="Password" class="col-md-2 control-label">Password</label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Password" class="form-control" />
|
||||
<input asp-for="Password" class="form-control" autocomplete="current-password" aria-required="true" placeholder="password" />
|
||||
<span asp-validation-for="Password" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
@ -45,7 +44,7 @@
|
||||
<a asp-action="Register" asp-controller="Account">Register as a new user?</a>
|
||||
</p>
|
||||
<p>
|
||||
<a asp-action="ForgotPassword" asp-controller="Account">Forgot your password?"]</a>
|
||||
<a asp-action="ForgotPassword" asp-controller="Account">Forgot your password</a>
|
||||
</p>
|
||||
<input type="hidden" name="Provider" value="LOCAL" />
|
||||
<input type="hidden" name="ReturnUrl" value="@Model.ReturnUrl" />
|
||||
@ -55,25 +54,5 @@
|
||||
|
||||
<hr/>
|
||||
<h2 class="lead text-left">Use another service to log in:</h2>
|
||||
@if (Model.ExternalProviders==null || Model.ExternalProviders.Count() == 0)
|
||||
{
|
||||
<div>
|
||||
<p>
|
||||
There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkID=532715">this article</a>
|
||||
for details on setting up this ASP.NET application to support logging in via external services.
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@foreach (var description in Model.ExternalProviders) {
|
||||
<form action="@Constants.LoginPath" method="post">
|
||||
<input type="hidden" name="Provider" value="@description.AuthenticationScheme" />
|
||||
<input type="hidden" name="ReturnUrl" value="@Model.ReturnUrl" />
|
||||
<button class="btn btn-lg btn-success" type="submit" name="Submit.Login">Connect using @description.DisplayName</button>
|
||||
@Html.AntiForgeryToken()
|
||||
</form>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user