Update register view

dashboard
Pat Hartl 2023-01-18 19:30:35 -06:00
parent 30a76e5467
commit 2278c85539
1 changed files with 35 additions and 52 deletions

View File

@ -1,64 +1,47 @@
@page
@model RegisterModel
@{ Layout = "/Views/Shared/_LayoutBasic.cshtml"; }
@{
ViewData["Title"] = "Register";
}
<h1>@ViewData["Title"]</h1>
<div class="page page-center">
<div class="container-tight py-4">
<div class="text-center mb-4">
<img src="~/static/logo.svg" />
</div>
<div class="row">
<div class="col-md-4">
<form id="registerForm" asp-route-returnUrl="@Model.ReturnUrl" method="post">
<h2>Create a new account.</h2>
<hr />
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-floating">
<input asp-for="Input.UserName" class="form-control" autocomplete="username" aria-required="true" />
<label asp-for="Input.UserName"></label>
<span asp-validation-for="Input.UserName" class="text-danger"></span>
<form id="registerForm" method="post" class="card card-md" autocomplete="off">
<div class="card-body">
<h2 class="card-title text-center mb-4">Create a new account</h2>
<div class="mb-3">
<label asp-for="Input.UserName" class="form-label"></label>
<input asp-for="Input.UserName" class="form-control" autocomplete="username" aria-required="true" />
<span asp-validation-for="Input.UserName" class="text-danger"></span>
</div>
<div class="mb-2">
<label asp-for="Input.Password" class="form-label"></label>
<input asp-for="Input.Password" class="form-control" autocomplete="current-password" aria-required="true" />
<span asp-validation-for="Input.Password" class="text-danger"></span>
</div>
<div class="mb-2">
<label asp-for="Input.ConfirmPassword" class="form-label"></label>
<input asp-for="Input.ConfirmPassword" class="form-control" autocomplete="new-password" aria-required="true" />
<span asp-validation-for="Input.ConfirmPassword" class="text-danger"></span>
</div>
<div class="form-footer">
<button id="register-submit" type="submit" class="btn btn-primary w-100">Register</button>
</div>
</div>
<div class="form-floating">
<input asp-for="Input.Password" class="form-control" autocomplete="new-password" aria-required="true" />
<label asp-for="Input.Password"></label>
<span asp-validation-for="Input.Password" class="text-danger"></span>
</div>
<div class="form-floating">
<input asp-for="Input.ConfirmPassword" class="form-control" autocomplete="new-password" aria-required="true" />
<label asp-for="Input.ConfirmPassword"></label>
<span asp-validation-for="Input.ConfirmPassword" class="text-danger"></span>
</div>
<button id="registerSubmit" type="submit" class="w-100 btn btn-lg btn-primary">Register</button>
</form>
</div>
<div class="col-md-6 col-md-offset-2">
<section>
<h3>Use another service to register.</h3>
<hr />
@{
if ((Model.ExternalLogins?.Count ?? 0) == 0)
{
<div>
<p>
There are no external authentication services configured. See this <a href="https://go.microsoft.com/fwlink/?LinkID=532715">article
about setting up this ASP.NET application to support logging in via external services</a>.
</p>
</div>
}
else
{
<form id="external-account" asp-page="./ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl" method="post" class="form-horizontal">
<div>
<p>
@foreach (var provider in Model.ExternalLogins)
{
<button type="submit" class="btn btn-primary" name="provider" value="@provider.Name" title="Log in using your @provider.DisplayName account">@provider.DisplayName</button>
}
</p>
</div>
</form>
}
}
</section>
<div class="text-center text-muted mt-3">
Already have an account? <a asp-page="./Login" asp-route-returnUrl="@Model.ReturnUrl" tabindex="-1">Login</a>
</div>
</div>
</div>