UserVerify.cshtml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. @model EMIS.ViewModel.SystemView.ChangePasswordView
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "UserVerify";
  5. }
  6. @section scripts{
  7. <script language="javascript">
  8. $(function () {
  9. $(".loginbutton").click(function () {
  10. if ($("#Password").val() != $("#PasswordRep").val()) {
  11. $.messager.alert('系统提示', '两次输入的密码必须一致', 'info');
  12. return;
  13. }
  14. var reg = /^(?=.*?[A-Z])(?=(.*[a-z]){1,})(?=(.*[\d]){1,})(?=(.*[\W]){1,})(?!.*\s).{8,}$/;
  15. var password = $("#Password").val();
  16. if (!reg.test(password)) {
  17. $.messager.alert('系统提示', '密码策略不符合(必须包含大小写英文字母、数字、字符、长度8位以上)。');
  18. return;
  19. }
  20. $(document.forms[0]).submit();
  21. });
  22. })
  23. </script>
  24. }
  25. <link href="@Url.Content("~/Content/Login.css")" rel="stylesheet" type="text/css" />
  26. <table align="center" valign="center" id="Table_01" width="1123" height="520" border="0"
  27. cellpadding="0" cellspacing="0">
  28. <tr>
  29. <td colspan="3" class="mainDiv01">
  30. &nbsp;
  31. </td>
  32. </tr>
  33. <tr>
  34. <td colspan="3" class="mainDiv02">
  35. &nbsp;
  36. </td>
  37. </tr>
  38. <tr>
  39. <td colspan="3" class="mainDiv03">
  40. &nbsp;
  41. </td>
  42. </tr>
  43. <tr>
  44. <td rowspan="2" class="mainDiv04">
  45. &nbsp;
  46. </td>
  47. <td class="mainDiv05">
  48. @using (Html.BeginForm(new { UserID = Request["UserID"], ReturnUrl = ViewBag.ReturnUrl }))
  49. {
  50. <table align="center" valign="center" width="218" height="168" border="0" cellpadding="0"
  51. cellspacing="0">
  52. <tr>
  53. <td colspan="3" height="26">
  54. <font color="red">验证成功,现在可以开始修改密码。</font>
  55. </td>
  56. </tr>
  57. <tr>
  58. <td colspan="3" height="16">
  59. </td>
  60. </tr>
  61. <tr>
  62. <td width="35" height="26">
  63. <img src="@Url.Content("~/Content/images/password.png")" width="30" height="34" alt="" />
  64. </td>
  65. <td colspan="2">
  66. @Html.PasswordFor(x => x.Password, new { placeholder = "请输入密码", autocomplete = "off" })
  67. @Html.ValidationMessageFor(x => x.Password)
  68. </td>
  69. </tr>
  70. <tr>
  71. <td width="35" height="26">
  72. <img src="@Url.Content("~/Content/images/password.png")" width="30" height="34" alt="" />
  73. </td>
  74. <td colspan="2">
  75. @Html.PasswordFor(x => x.PasswordRep, new { placeholder = "请再次输入密码", autocomplete = "off" })
  76. @Html.ValidationMessageFor(x => x.PasswordRep)
  77. </td>
  78. </tr>
  79. <tr>
  80. <td colspan="3" height="16">
  81. </td>
  82. </tr>
  83. <tr>
  84. <td colspan="3" class="loginbutton">
  85. 下&nbsp;一&nbsp;步
  86. </td>
  87. </tr>
  88. </table>
  89. }
  90. </td>
  91. <td rowspan="2" class="mainDiv06">
  92. &nbsp;
  93. </td>
  94. </tr>
  95. <tr>
  96. <td class="mainDiv07">
  97. &nbsp;
  98. </td>
  99. </tr>
  100. <tr>
  101. <td colspan="3" class="mainDiv08">
  102. &nbsp;
  103. </td>
  104. </tr>
  105. </table>