1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- @model EMIS.ViewModel.SystemView.ChangePasswordView
- @using EMIS.Web.Controls;
- @using Bowin.Web.Controls.Mvc;
- @{
- ViewBag.Title = "ChangePassword";
- }
- @section scripts{
- <script language="javascript">
- function Password_Save() {
- var reg = /^(?=.*?[A-Z])(?=(.*[a-z]){1,})(?=(.*[\d]){1,})(?=(.*[\W]){1,})(?!.*\s).{8,}$/;
- var password = $("#Password").val();
- var passwordRep = $("#PasswordRep").val();
- if (!reg.test(password) || !reg.test(passwordRep)) {
- $.messager.alert('系统提示', '密码策略不符合(必须包含大小写英文字母、数字、字符、长度8位以上)。');
- return;
- }
- if (password != passwordRep) {
- $.messager.alert('系统提示', '两次输入的密码必须一致。');
- return;
- }
- $(document.forms[0]).submit();
- }
- </script>
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- @using (Ajax.BeginForm(new AjaxOptions
- {
- OnSuccess = "EMISFunction.FormSuccess",
- OnBegin = "EMISFunction.FormSubmit",
- OnComplete = "EMISFunction.FormComplete"
- }))
- {
- <div class="p_title">
- <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
- 密码修改</div>
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
- <div class="current_navbar toolbar">
- <div class="func_info">
- @Html.Button(new ButtonOptions { OnClick = "Password_Save()", Icon = ButtonIcon.Save, Text = "保存" })
- </div>
- </div>
- </div>
- </div>
- <div class="search_list">
- <table cellpadding="0" cellspacing="0" id="departmenttable" width="100%">
- <tr>
- <td width="20%">@Html.LabelFor(x => x.OldPassword):
- </td>
- <td>@Html.PasswordFor(x => x.OldPassword, new { placeholder = "请输入旧密码", autocomplete = "off" })
- @Html.ValidationMessageFor(x => x.OldPassword)
- </td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.Password):
- </td>
- <td>@Html.PasswordFor(x => x.Password, new { placeholder = "请输入密码", autocomplete = "off" })
- </td>
- </tr>
- <tr>
- <td>@Html.LabelFor(x => x.PasswordRep):
- </td>
- <td>@Html.PasswordFor(x => x.PasswordRep, new { placeholder = "请再次输入密码", autocomplete = "off" })
- </td>
- </tr>
- </table>
- </div>
- }
- </div>
|