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 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. @model LoginViewModel
  2. @{
  3. string logoPath = "/images/logo-blue.svg";
  4. // If we are using a CDN, let's replace it
  5. if (Config.UseCdn)
  6. {
  7. if (!string.IsNullOrEmpty(Config.CdnHost))
  8. {
  9. logoPath = Config.CdnHost.TrimEnd('/') + logoPath;
  10. }
  11. }
  12. }
  13. @if (Config.UserConfig.LoginEnabled)
  14. {
  15. <div class="container">
  16. <div class="row">
  17. <div class="col-md-12 text-center">
  18. <div class="row">
  19. <img src="@logoPath" class="img-responsive center-block" alt="Teknik">
  20. </div>
  21. <br />
  22. <div class="col-md-4 col-md-offset-4">
  23. @await Html.PartialAsync("_ValidationSummary")
  24. @if (Model.EnableLocalLogin)
  25. {
  26. <form class="form-horizontal" asp-route="Login">
  27. <input type="hidden" asp-for="ReturnUrl" />
  28. <div class="form-group">
  29. <input class="form-control" placeholder="Username" asp-for="Username" autofocus>
  30. </div>
  31. <div class="form-group">
  32. <input type="password" class="form-control" placeholder="Password" asp-for="Password" autocomplete="off">
  33. </div>
  34. @if (Model.AllowRememberLogin)
  35. {
  36. <div class="form-group abc-checkbox">
  37. <input asp-for="RememberMe">
  38. <label asp-for="RememberMe">Remember My Login</label>
  39. </div>
  40. }
  41. <div class="form-group">
  42. <button class="btn btn-primary" name="button" value="login">Log In</button>
  43. <button class="btn btn-default" name="button" value="cancel">Cancel</button>
  44. </div>
  45. </form>
  46. }
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. }
  52. else
  53. {
  54. <h3>Authentication is currently disabled.</h3>
  55. }