The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Login.cshtml 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. @model Teknik.Areas.Users.ViewModels.LoginViewModel
  2. @if (Model.Config.UserConfig.LoginEnabled)
  3. {
  4. <div class="row">
  5. <div class="col-sm-12 text-center">
  6. <div id="loginStatus">
  7. @if (Model.Error)
  8. {
  9. <div class="alert alert-danger alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>@Model.ErrorMessage</div>
  10. }
  11. </div>
  12. </div>
  13. </div>
  14. <form id="loginForm" action="@Url.SubRouteUrl("user", "User.Login")" method="post" accept-charset="UTF-8">
  15. <input name="Login.ReturnUrl" id="loginReturnUrl" type="hidden" value="@Model.ReturnUrl" />
  16. <div class="form-group">
  17. <input type="text" class="form-control" id="loginUsername" value="" placeholder="Username" name="Login.Username" data-val-required="The Username field is required." data-val="true" />
  18. </div>
  19. <div class="form-group">
  20. <input type="password" class="form-control" id="loginPassword" value="" placeholder="Password" name="Login.Password" data-val-required="The Password field is required." data-val="true" />
  21. </div>
  22. <div class="checkbox">
  23. <label>
  24. <input id="loginRememberMe" type="checkbox" value="true" name="Login.RememberMe" data-val-required="The Remember Me field is required." data-val="true" /><input name="Login.RememberMe" type="hidden" value="false"> Remember Me
  25. </label>
  26. </div>
  27. @if (Model.Config.UserConfig.PasswordResetEnabled)
  28. {
  29. <p class="text-center"><a href="@Url.SubRouteUrl("user", "User.ResetPassword")">Forgotten Password?</a></p>
  30. }
  31. <div class="form-group text-center">
  32. <button class="btn btn-primary" id="loginSubmit" type="submit" name="Login.Submit">Sign In</button>
  33. </div>
  34. </form>
  35. }
  36. else
  37. {
  38. <h3>User logins have been disabled</h3>
  39. }