|
2 | 2 | @model RegisterModel
|
3 | 3 | @{
|
4 | 4 | ViewData["Title"] = "Register";
|
| 5 | + Layout = "~/Areas/Identity/Pages/_AuthLayout.cshtml"; |
5 | 6 | }
|
6 | 7 |
|
7 |
| -<h1>@ViewData["Title"]</h1> |
8 |
| - |
9 |
| -<div class="row"> |
10 |
| - <div class="col-md-4"> |
11 |
| - <form id="registerForm" asp-route-returnUrl="@Model.ReturnUrl" method="post"> |
12 |
| - <h2>Create a new account.</h2> |
13 |
| - <hr /> |
14 |
| - <div asp-validation-summary="ModelOnly" class="text-danger" role="alert"></div> |
15 |
| - <div class="form-floating mb-3"> |
16 |
| - <input asp-for="Input.Email" class="form-control" autocomplete="username" aria-required="true" placeholder="name@example.com" /> |
17 |
| - <label asp-for="Input.Email">Email</label> |
18 |
| - <span asp-validation-for="Input.Email" class="text-danger"></span> |
19 |
| - </div> |
| 8 | +<form id="registerForm" asp-route-returnUrl="@Model.ReturnUrl" method="post"> |
| 9 | + <h2 class="row justify-content-center">New Account</h2> |
| 10 | + <hr /> |
| 11 | + <div asp-validation-summary="ModelOnly" class="text-danger" role="alert"></div> |
| 12 | + <div class="row"> |
| 13 | + <div class="col-6"> |
20 | 14 | <div class="form-floating mb-3">
|
21 |
| - <input asp-for="Input.Password" class="form-control" autocomplete="new-password" aria-required="true" placeholder="password" /> |
22 |
| - <label asp-for="Input.Password">Password</label> |
23 |
| - <span asp-validation-for="Input.Password" class="text-danger"></span> |
| 15 | + <input asp-for="Input.FirstName" class="form-control" autocomplete="firstname" aria-required="true" placeholder="first name" /> |
| 16 | + <label asp-for="Input.FirstName">First Name</label> |
| 17 | + <span asp-validation-for="Input.FirstName" class="text-danger"></span> |
24 | 18 | </div>
|
| 19 | + </div> |
| 20 | + <div class="col-6"> |
25 | 21 | <div class="form-floating mb-3">
|
26 |
| - <input asp-for="Input.ConfirmPassword" class="form-control" autocomplete="new-password" aria-required="true" placeholder="password" /> |
27 |
| - <label asp-for="Input.ConfirmPassword">Confirm Password</label> |
28 |
| - <span asp-validation-for="Input.ConfirmPassword" class="text-danger"></span> |
| 22 | + <input asp-for="Input.LastName" class="form-control" autocomplete="lastname" aria-required="true" placeholder="last name" /> |
| 23 | + <label asp-for="Input.LastName">Last Name</label> |
| 24 | + <span asp-validation-for="Input.LastName" class="text-danger"></span> |
29 | 25 | </div>
|
30 |
| - <button id="registerSubmit" type="submit" class="w-100 btn btn-lg btn-primary">Register</button> |
31 |
| - </form> |
| 26 | + </div> |
32 | 27 | </div>
|
33 |
| - <div class="col-md-6 col-md-offset-2"> |
34 |
| - <section> |
35 |
| - <h3>Use another service to register.</h3> |
36 |
| - <hr /> |
37 |
| - @{ |
38 |
| - if ((Model.ExternalLogins?.Count ?? 0) == 0) |
39 |
| - { |
40 |
| - <div> |
41 |
| - <p> |
42 |
| - There are no external authentication services configured. See this <a href="https://go.microsoft.com/fwlink/?LinkID=532715">article |
43 |
| - about setting up this ASP.NET application to support logging in via external services</a>. |
44 |
| - </p> |
45 |
| - </div> |
46 |
| - } |
47 |
| - else |
48 |
| - { |
49 |
| - <form id="external-account" asp-page="./ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl" method="post" class="form-horizontal"> |
50 |
| - <div> |
51 |
| - <p> |
52 |
| - @foreach (var provider in Model.ExternalLogins!) |
53 |
| - { |
54 |
| - <button type="submit" class="btn btn-primary" name="provider" value="@provider.Name" title="Log in using your @provider.DisplayName account">@provider.DisplayName</button> |
55 |
| - } |
56 |
| - </p> |
57 |
| - </div> |
58 |
| - </form> |
59 |
| - } |
60 |
| - } |
61 |
| - </section> |
| 28 | + <div class="form-floating mb-3"> |
| 29 | + <input asp-for="Input.Email" class="form-control" autocomplete="username" aria-required="true" placeholder="name@example.com" /> |
| 30 | + <label asp-for="Input.Email">Email</label> |
| 31 | + <span asp-validation-for="Input.Email" class="text-danger"></span> |
62 | 32 | </div>
|
63 |
| -</div> |
64 |
| - |
| 33 | + <div class="form-floating mb-3"> |
| 34 | + <input asp-for="Input.Password" class="form-control" autocomplete="new-password" aria-required="true" placeholder="password" /> |
| 35 | + <label asp-for="Input.Password">Password</label> |
| 36 | + <span asp-validation-for="Input.Password" class="text-danger"></span> |
| 37 | + </div> |
| 38 | + <div class="form-floating mb-3"> |
| 39 | + <input asp-for="Input.ConfirmPassword" class="form-control" autocomplete="new-password" aria-required="true" placeholder="password" /> |
| 40 | + <label asp-for="Input.ConfirmPassword">Confirm Password</label> |
| 41 | + <span asp-validation-for="Input.ConfirmPassword" class="text-danger"></span> |
| 42 | + </div> |
| 43 | + <button id="registerSubmit" type="submit" class="w-100 btn btn-lg btn-primary">Register</button> |
| 44 | +</form> |
| 45 | + |
65 | 46 | @section Scripts {
|
66 | 47 | <partial name="_ValidationScriptsPartial" />
|
67 | 48 | }
|
0 commit comments