Merge pull request 'Добавил формы логина и регисрации поручителя' (#11) from add_login_and_register_forms into stage7_user_web_interface_prototype

Reviewed-on: #11
This commit is contained in:
Никита Потапов 2024-05-01 15:45:03 +04:00
commit 01087d2f90
4 changed files with 87 additions and 1 deletions

View File

@ -58,6 +58,36 @@ namespace PolyclinicWebAppSuretor.Controllers
return View();
}
[HttpGet]
[HttpPost]
public IActionResult Login()
{
if (HttpContext.Request.Method == "POST")
{
// êàêèå-òî äåéñòâèÿ ïðè íàæàòèè êíîïêè âõîäà
return View();
}
else
{
return View();
}
}
[HttpGet]
[HttpPost]
public IActionResult Register()
{
if (HttpContext.Request.Method == "POST")
{
// êàêèå-òî äåéñòâèÿ ïðè íàæàòèè êíîïêè
return View();
}
else
{
return View();
}
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{

View File

@ -7,11 +7,13 @@
public static (string Url, string Title) Procedures = ("Procedures", "Процедуры");
public static (string Url, string Title) Recipes = ("Recipes", "Рецепты");
public static (string Url, string Title) Users = ("Users", "Пользователи");
public static (string Url, string Title) Login = ("Login", "Вход");
public static (string Url, string Title) Register = ("Register", "Регистрация");
public static (string Url, string Title) ListCoursesByProcedures = ("ListCoursesByProcedures", "Список курсов приема препаратов");
public static List<(string Url, string Title)> MenuItemsOrder = new List<(string Url, string Title)>
{
Index, Medicaments, Procedures, Recipes, Users, ListCoursesByProcedures
Index, Medicaments, Procedures, Recipes, Users, ListCoursesByProcedures, Login, Register
};
}
}

View File

@ -0,0 +1,25 @@
@{
ViewBag.SelectedSiteMenuItem = SiteMenuItems.Login;
}
<div class="d-flex w-100 h-100 align-content-center justify-content-center align-items-center mt-5 pt-5">
<form class="d-flex flex-column border border-primary border-3 rounded-3 p-5" id="loginForm" method="post">
<h4>Вход</h4>
<div class="mb-2 row">
<label for="emailInput" class="col-4 ps-0">
Email
</label>
<input id="emailInput" type="email" name="email" placeholder="mail@example.com" class="col-8" />
</div>
<div class="mb-2 row">
<label for="passwordInput" class="col-4 ps-0">
Пароль
</label>
<input id="passwordInput" type="password" name="password" class="col-8" />
</div>
<div class="row">
<button class="btn btn-outline-primary w-100" type="submit">
Войти
</button>
</div>
</form>
</div>

View File

@ -0,0 +1,29 @@
@{
ViewBag.SelectedSiteMenuItem = SiteMenuItems.Register;
}
<div class="d-flex w-100 h-100 align-content-center justify-content-center align-items-center mt-5 pt-5">
<form class="d-flex flex-column border border-success border-3 rounded-3 p-5" id="loginForm" method="post">
<h4>Регистрация</h4>
<div class="d-flex mb-3">
<label for="fioInput" class="pe-3 w-25">
ФИО
</label>
<input class="w-100" type="text" name="fio" id="fioInput" placeholder="Иванов Иван Иванович" />
</div>
<div class="d-flex mb-3">
<label for="emailInput" class="pe-3 w-25">
Email
</label>
<input class="w-100" type="email" name="email" id="emailInput" placeholder="mail@example.com" />
</div>
<div class="d-flex mb-3">
<label for="passwordInput" class="pe-3 w-50">
Пароль
</label>
<input class="w-100" type="password" name="password" id="passwordInput" />
</div>
<button class="btn btn-outline-success" type="submit">
Зарегистрироваться
</button>
</form>
</div>