Реализовал страницу логина

This commit is contained in:
Никита Потапов 2024-04-30 21:55:00 +04:00
parent 180a586857
commit 62696615f2
2 changed files with 30 additions and 1 deletions

View File

@ -71,10 +71,19 @@ namespace PolyclinicWebAppImplementer.Controllers
return View();
}
[HttpGet]
[HttpPost]
public IActionResult Login()
{
if (HttpContext.Request.Method == "POST")
{
return Redirect("~/");
}
else
{
return View();
}
}
public IActionResult Register()
{

View File

@ -1,3 +1,23 @@
@{
ViewBag.SelectedSiteMenuItem = SiteMenuItems.Login;
}
<div class="d-flex w-100 h-100 align-content-center justify-content-center">
<form class="d-flex flex-column" id="loginForm"method="post">
<h4>Вход</h4>
<div class="mb-2 d-flex w-100">
<label for="emailInput" class="me-2">
Email
</label>
<input id="emailInput" type="text" placeholder="mail@example.com" class="w-100"/>
</div>
<div class="mb-2 d-flex w-100">
<label for="passwordInput" class="me-2">
Пароль
</label>
<input id="passwordInput" type="password" class="w-100"/>
</div>
<button class="btn btn-outline-primary" type="submit">
Войти
</button>
</form>
</div>