mirror of https://github.com/abpframework/abp.git
3 changed files with 45 additions and 42 deletions
@ -0,0 +1,4 @@ |
|||||
|
{ |
||||
|
"singleQuote": true, |
||||
|
"useTabs": true |
||||
|
} |
||||
@ -1,5 +1,7 @@ |
|||||
document.addEventListener("DOMContentLoaded", function (event) { |
document.addEventListener('DOMContentLoaded', function (event) { |
||||
setTimeout(function () { |
setTimeout(function () { |
||||
window.location = document.getElementById("redirectButton").getAttribute("href"); |
window.location = document |
||||
}, 3000) |
.getElementById('redirectButton') |
||||
|
.getAttribute('href'); |
||||
|
}, 3000); |
||||
}); |
}); |
||||
|
|||||
@ -1,50 +1,47 @@ |
|||||
(function ($) { |
(function ($) { |
||||
|
var l = abp.localization.getResource('AbpAccount'); |
||||
|
|
||||
var l = abp.localization.getResource('AbpAccount'); |
var _profileService = volo.abp.identity.profile; |
||||
|
|
||||
var _profileService = volo.abp.identity.profile; |
$('#ChangePasswordForm').submit(function (e) { |
||||
|
e.preventDefault(); |
||||
|
|
||||
$("#ChangePasswordForm").submit(function (e) { |
if (!$('#ChangePasswordForm').valid()) { |
||||
e.preventDefault(); |
return false; |
||||
|
} |
||||
|
|
||||
if (!$("#ChangePasswordForm").valid()) { |
var input = $('#ChangePasswordForm').serializeFormToObject() |
||||
return false; |
.changePasswordInfoModel; |
||||
} |
|
||||
|
|
||||
var input = $("#ChangePasswordForm").serializeFormToObject().changePasswordInfoModel; |
if ( |
||||
|
input.newPassword != input.newPasswordConfirm || |
||||
|
input.currentPassword == '' |
||||
|
) { |
||||
|
abp.message.error(l('NewPasswordConfirmFailed')); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
if (input.newPassword != input.newPasswordConfirm || input.currentPassword == '') { |
if (input.currentPassword == '') { |
||||
abp.message.error(l("NewPasswordConfirmFailed")); |
return; |
||||
return; |
} |
||||
} |
|
||||
|
|
||||
if (input.currentPassword == '') { |
_profileService.changePassword(input).then(function (result) { |
||||
return; |
abp.message.success(l('PasswordChanged')); |
||||
} |
}); |
||||
|
}); |
||||
|
|
||||
_profileService.changePassword( |
$('#PersonalSettingsForm').submit(function (e) { |
||||
input |
e.preventDefault(); |
||||
).then(function (result) { |
|
||||
abp.message.success(l("PasswordChanged")); |
|
||||
}); |
|
||||
|
|
||||
}); |
if (!$('#PersonalSettingsForm').valid()) { |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
$("#PersonalSettingsForm").submit(function (e) { |
var input = $('#PersonalSettingsForm').serializeFormToObject() |
||||
e.preventDefault(); |
.personalSettingsInfoModel; |
||||
|
|
||||
if (!$("#PersonalSettingsForm").valid()) { |
_profileService.update(input).then(function (result) { |
||||
return false; |
abp.notify.success(l('PersonalSettingsSaved')); |
||||
} |
}); |
||||
|
}); |
||||
var input = $("#PersonalSettingsForm").serializeFormToObject().personalSettingsInfoModel; |
})(jQuery); |
||||
|
|
||||
_profileService.update( |
|
||||
input |
|
||||
).then(function (result) { |
|
||||
abp.notify.success(l("PersonalSettingsSaved")); |
|
||||
}); |
|
||||
|
|
||||
}); |
|
||||
|
|
||||
})(jQuery); |
|
||||
|
|||||
Loading…
Reference in new issue