MainChangePwd.cshtml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. @model EMIS.ViewModel.SystemView.ChangePasswordView
  2. @using Bowin.Web.Controls.Mvc;
  3. @using EMIS.Web.Controls;
  4. @using Bowin.Common;
  5. @{
  6. Layout = "~/Views/Shared/_FrameLayout.cshtml";
  7. List<string> lurl = new List<string>();
  8. lurl.Add("Content/");
  9. lurl.Add("Doc/");
  10. lurl.Add("Scripts/");
  11. lurl.Add("Login/");
  12. lurl.Add("UploadFile/");
  13. lurl.Add("Account/ChangePassword");
  14. FormsAuthenticationHelper fahelper = new FormsAuthenticationHelper();
  15. var cookieName = EMIS.Utility.Const.LOCAL_SETTING_LOGIN_COOKIENAME;
  16. fahelper.AuthenticateRequest(HttpContext.Current, cookieName, lurl);
  17. }
  18. @section scripts{
  19. <script type="text/javascript">
  20. function Password_Save() {
  21. if ($("#Password").val() != $("#PasswordRep").val()) {
  22. $.messager.alert('系统提示', '两次输入的密码必须一致', 'info');
  23. return;
  24. }
  25. $(document.forms[0]).submit();
  26. }
  27. function ChangeSuccess (data) {
  28. $('a').removeAttr('disabled', 'disabled');
  29. $('#loading').hide();
  30. if (data.IsSuccess) {
  31. $.messager.alert('系统信息', "密码修改成功,请重新登录", null, function () {
  32. location.href = "@Url.Content("~/Account/LogOff")";
  33. });
  34. } else {
  35. $.messager.alert('系统信息', data.Message, null);
  36. }
  37. }
  38. </script>
  39. }
  40. <div data-options="region:'north',title:'',split:false, border:false" class="index_top_banner">
  41. <div class="index_top_bg">
  42. <div id="index_top" class="index_top_left">
  43. <img src="@Url.Content("~/common/ResImage?key=HomeLogo")" />
  44. </div>
  45. <div id="divCurrentInformation">
  46. 当前用户:@(((EMIS.Utility.FormValidate.CustomPrincipal)Context.User).LoginID + "-" + ((EMIS.Utility.FormValidate.CustomPrincipal)Context.User).Name + (((EMIS.Utility.FormValidate.CustomPrincipal)Context.User).IsStudent ? "同学" : "老师"))&nbsp;&nbsp;@Html.SystemClock(new SystemClockOptions { IsJump = true })
  47. </div>
  48. <div style="float: right; padding-right: 30px; padding-top: 40px;">
  49. &nbsp;&nbsp; <a href="@Url.Content("~/Account/LogOff")" style="z-index: 99999;">
  50. <img border="0" title="退出" src="@Url.Content("~/Content/Bowin.Control.Core/images/h_logout.jpg")" />
  51. </a>
  52. </div>
  53. </div>
  54. </div>
  55. <div id="index_left" class="index_left_bg" data-options="region:'west',title:'',split:false,tools:'#tab-tools'"
  56. style="width: 150px;">
  57. </div>
  58. <div region="center" border="true" title="" class="index_center_bg">
  59. <div id="index_main" class="easyui-layout" data-options="border:false,fit:true">
  60. <div data-options="region:'center',border:false">
  61. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  62. @using (Ajax.BeginForm(new AjaxOptions
  63. {
  64. Url = Url.Content("~/Account/ChangePassword"),
  65. OnSuccess = "ChangeSuccess",
  66. OnBegin = "EMISFunction.FormSubmit",
  67. OnComplete = "EMISFunction.FormComplete"
  68. }))
  69. {
  70. <div class="p_title">
  71. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  72. <span style="color: #000000">@(((EMIS.Utility.FormValidate.CustomPrincipal)Context.User).NeedChangePwdReason),请修改密码</span>
  73. </div>
  74. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  75. <div class="current_navbar toolbar">
  76. <div class="func_info">
  77. @Html.Button(new ButtonOptions { OnClick = "Password_Save()", Icon = ButtonIcon.Save, Text = "保存" })
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="search_list">
  83. <table cellpadding="0" cellspacing="0" id="departmenttable" width="100%">
  84. <tr>
  85. <td width="20%">
  86. @Html.LabelFor(x => x.OldPassword):
  87. </td>
  88. <td>
  89. @Html.PasswordFor(x => x.OldPassword, new { placeholder = "请输入旧密码", autocomplete = "off" })
  90. @Html.ValidationMessageFor(x => x.OldPassword)
  91. </td>
  92. </tr>
  93. <tr>
  94. <td>
  95. @Html.LabelFor(x => x.Password):
  96. </td>
  97. <td>
  98. @Html.PasswordFor(x => x.Password, new { placeholder = "请输入密码", autocomplete = "off" })
  99. </td>
  100. </tr>
  101. <tr>
  102. <td>
  103. @Html.LabelFor(x => x.PasswordRep):
  104. </td>
  105. <td>
  106. @Html.PasswordFor(x => x.PasswordRep, new { placeholder = "请再次输入密码", autocomplete = "off" })
  107. </td>
  108. </tr>
  109. </table>
  110. </div>
  111. }
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. <div id="index_bottom" class="index_bottom_bg" region="south" border="true" title="">
  117. <div style="float: left; width: 40%; text-align: center; white-space: nowrap;">
  118. 教育部中央教育科学研究所高等教育研究中心监制
  119. </div>
  120. <div style="float: right; width: 40%; text-align:right; white-space: nowrap;">
  121. <a href="http://www.bowintek.com" target="_blank">
  122. Copyright <img src="~/Images/copyright.png" style="height:10px" /> 广州市博颖信息科技有限公司 All Rights Reserved
  123. </a>
  124. </div>
  125. </div>
  126. <div id="sysWindow">
  127. </div>