Browse Source

Merge pull request #12755 from abpframework/enisn/5.3-issue-12461

Reset change password form after succeeded
pull/12761/head
Enis Necipoglu 4 years ago
committed by GitHub
parent
commit
258190dd1d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor.cs
  2. 1
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.js

9
modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor.cs

@ -53,6 +53,8 @@ public partial class AccountManage
NewPassword = ChangePasswordModel.NewPassword
});
ChangePasswordModel.Clear();
await UiMessageService.Success(L["PasswordChanged"]);
}
@ -75,6 +77,13 @@ public class ChangePasswordModel
public string NewPasswordConfirm { get; set; }
public bool HideOldPasswordInput { get; set; }
public void Clear()
{
CurrentPassword = string.Empty;
NewPassword = string.Empty;
NewPasswordConfirm = string.Empty;
}
}
public class PersonalInfoModel

1
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/Default.js

@ -26,6 +26,7 @@
volo.abp.account.profile.changePassword(input).then(function (result) {
abp.message.success(l('PasswordChanged'));
abp.event.trigger('passwordChanged');
$('#ChangePasswordForm').trigger("reset");
});
});
});

Loading…
Cancel
Save