Login.cshtml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @using Winsoft.GOV.XF.WX.Models
  2. @model LoginViewModel
  3. @{
  4. ViewBag.Title = "登录";
  5. }
  6. <h2>@ViewBag.Title。</h2>
  7. <div class="row">
  8. <div class="col-md-8">
  9. <section id="loginForm">
  10. @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
  11. {
  12. @Html.AntiForgeryToken()
  13. <h4>使用本地帐户登录。</h4>
  14. <hr />
  15. @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  16. <div class="form-group">
  17. @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" })
  18. <div class="col-md-10">
  19. @Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
  20. @Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" })
  21. </div>
  22. </div>
  23. <div class="form-group">
  24. @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
  25. <div class="col-md-10">
  26. @Html.PasswordFor(m => m.Password, new { @class = "form-control" })
  27. @Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" })
  28. </div>
  29. </div>
  30. <div class="form-group">
  31. <div class="col-md-offset-2 col-md-10">
  32. <div class="checkbox">
  33. @Html.CheckBoxFor(m => m.RememberMe)
  34. @Html.LabelFor(m => m.RememberMe)
  35. </div>
  36. </div>
  37. </div>
  38. <div class="form-group">
  39. <div class="col-md-offset-2 col-md-10">
  40. <input type="submit" value="登录" class="btn btn-default" />
  41. </div>
  42. </div>
  43. <p>
  44. @Html.ActionLink("注册为新用户", "Register")
  45. </p>
  46. @* 在为密码重置功能启用帐户确认后启用此项
  47. <p>
  48. @Html.ActionLink("忘记了密码?", "ForgotPassword")
  49. </p>*@
  50. }
  51. </section>
  52. </div>
  53. <div class="col-md-4">
  54. <section id="socialLoginForm">
  55. @Html.Partial("_ExternalLoginsListPartial", new ExternalLoginListViewModel { ReturnUrl = ViewBag.ReturnUrl })
  56. </section>
  57. </div>
  58. </div>
  59. @section Scripts {
  60. @Scripts.Render("~/bundles/jqueryval")
  61. }