Browse Source

Account Module - prettier settings added and js files reformatted

pull/4706/head
Ahmet Çotur 6 years ago
parent
commit
f2032ff7a4
  1. 4
      modules/account/.prettierrc
  2. 10
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/LoggedOut.js
  3. 73
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.js

4
modules/account/.prettierrc

@ -0,0 +1,4 @@
{
"singleQuote": true,
"useTabs": true
}

10
modules/account/src/Volo.Abp.Account.Web/Pages/Account/LoggedOut.js

@ -1,5 +1,7 @@
document.addEventListener("DOMContentLoaded", function (event) {
setTimeout(function () {
window.location = document.getElementById("redirectButton").getAttribute("href");
}, 3000)
document.addEventListener('DOMContentLoaded', function (event) {
setTimeout(function () {
window.location = document
.getElementById('redirectButton')
.getAttribute('href');
}, 3000);
});

73
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.js

@ -1,50 +1,47 @@
(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) {
e.preventDefault();
if (!$('#ChangePasswordForm').valid()) {
return false;
}
if (!$("#ChangePasswordForm").valid()) {
return false;
}
var input = $('#ChangePasswordForm').serializeFormToObject()
.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 == '') {
abp.message.error(l("NewPasswordConfirmFailed"));
return;
}
if (input.currentPassword == '') {
return;
}
if (input.currentPassword == '') {
return;
}
_profileService.changePassword(input).then(function (result) {
abp.message.success(l('PasswordChanged'));
});
});
_profileService.changePassword(
input
).then(function (result) {
abp.message.success(l("PasswordChanged"));
});
$('#PersonalSettingsForm').submit(function (e) {
e.preventDefault();
});
if (!$('#PersonalSettingsForm').valid()) {
return false;
}
$("#PersonalSettingsForm").submit(function (e) {
e.preventDefault();
var input = $('#PersonalSettingsForm').serializeFormToObject()
.personalSettingsInfoModel;
if (!$("#PersonalSettingsForm").valid()) {
return false;
}
var input = $("#PersonalSettingsForm").serializeFormToObject().personalSettingsInfoModel;
_profileService.update(
input
).then(function (result) {
abp.notify.success(l("PersonalSettingsSaved"));
});
});
})(jQuery);
_profileService.update(input).then(function (result) {
abp.notify.success(l('PersonalSettingsSaved'));
});
});
})(jQuery);

Loading…
Cancel
Save