diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-08 18:35:53 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-08 18:35:53 +0300 |
| commit | d1cb22d3acb22532a13b4e9991f867d22565a897 (patch) | |
| tree | 1aeba9c844d9c152311ae6add73a35d7465320fb /ExamTemplate | |
| parent | e3af1e39bd7cd1b2f8a4989388d76ee4be943b4c (diff) | |
| download | it-kariera-exam-template-d1cb22d3acb22532a13b4e9991f867d22565a897.tar it-kariera-exam-template-d1cb22d3acb22532a13b4e9991f867d22565a897.tar.gz it-kariera-exam-template-d1cb22d3acb22532a13b4e9991f867d22565a897.zip | |
Added login message when login was unsuccessful
Diffstat (limited to 'ExamTemplate')
| -rw-r--r-- | ExamTemplate/Web/Controllers/AccountController.cs | 2 | ||||
| -rw-r--r-- | ExamTemplate/Web/Views/Account/Login.cshtml | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/ExamTemplate/Web/Controllers/AccountController.cs b/ExamTemplate/Web/Controllers/AccountController.cs index 4a4f5b2..4e52c86 100644 --- a/ExamTemplate/Web/Controllers/AccountController.cs +++ b/ExamTemplate/Web/Controllers/AccountController.cs @@ -68,7 +68,7 @@ namespace ExamTemplate.Web.Controllers if (result) return RedirectToAction("Index", "Home"); else - return View(); + return View(loginUserViewModel); } [HttpPost] diff --git a/ExamTemplate/Web/Views/Account/Login.cshtml b/ExamTemplate/Web/Views/Account/Login.cshtml index 688c547..82a90c0 100644 --- a/ExamTemplate/Web/Views/Account/Login.cshtml +++ b/ExamTemplate/Web/Views/Account/Login.cshtml @@ -11,4 +11,13 @@ <span asp-validation-for="Password" class="form-error"></span> <input type="submit"> + + @if (Model != null) + { + <p class="form-error"> + Invalid credentials or account doesn't exist! + </p> + } </form> + + |
