ChangePassword.cshtml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. @model EMIS.ViewModel.SystemView.ChangePasswordView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "ChangePassword";
  6. }
  7. @section scripts{
  8. <script language="javascript">
  9. function Password_Save() {
  10. if ($("#OldPassword").val() == $("#Password").val()) {
  11. $.messager.alert('系统提示', '新密码不能和旧密码相同', 'info');
  12. return;
  13. }
  14. if ($("#Password").val() != $("#PasswordRep").val()) {
  15. $.messager.alert('系统提示', '两次输入的密码必须一致', 'info');
  16. return;
  17. }
  18. $(document.forms[0]).submit();
  19. }
  20. </script>
  21. }
  22. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  23. @using (Ajax.BeginForm(new AjaxOptions
  24. {
  25. OnSuccess = "EMISFunction.FormSuccess",
  26. OnBegin = "EMISFunction.FormSubmit",
  27. OnComplete = "EMISFunction.FormComplete"
  28. }))
  29. {
  30. <div class="p_title">
  31. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  32. 密码修改</div>
  33. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  34. <div class="current_navbar toolbar">
  35. <div class="func_info">
  36. @Html.Button(new ButtonOptions { OnClick = "Password_Save()", Icon = ButtonIcon.Save, Text = "保存" })
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="search_list">
  42. <table cellpadding="0" cellspacing="0" id="departmenttable" width="100%">
  43. <tr>
  44. <td width="20%">@Html.LabelFor(x => x.OldPassword):
  45. </td>
  46. <td>@Html.PasswordFor(x => x.OldPassword, new { placeholder = "请输入旧密码", autocomplete = "off" })
  47. @Html.ValidationMessageFor(x => x.OldPassword)
  48. </td>
  49. </tr>
  50. <tr>
  51. <td>@Html.LabelFor(x => x.Password):
  52. </td>
  53. <td>@Html.PasswordFor(x => x.Password, new { placeholder = "请输入密码", autocomplete = "off" })
  54. </td>
  55. </tr>
  56. <tr>
  57. <td>@Html.LabelFor(x => x.PasswordRep):
  58. </td>
  59. <td>@Html.PasswordFor(x => x.PasswordRep, new { placeholder = "请再次输入密码", autocomplete = "off" })
  60. </td>
  61. </tr>
  62. </table>
  63. </div>
  64. }
  65. </div>