diff --git a/modules/core/client/app/trans-string-en.js b/modules/core/client/app/trans-string-en.js index 7bc7aab2..e5272d25 100644 --- a/modules/core/client/app/trans-string-en.js +++ b/modules/core/client/app/trans-string-en.js @@ -221,8 +221,7 @@ PASSWORD_REQ: 'Password Requirements', P_REQUIRED: 'Password is required.', FORGOT_PASSWORD: 'Forgot your password?', - FN_REQUIRED: 'First name is required.', - LN_REQUIRED: 'Last name is required.', + DN_REQUIRED: 'Display name is required.', NEW_PASSWORD: 'New Password', NP_REQUIRED: 'Enter a new password.', @@ -614,8 +613,6 @@ RESET_DEFAULT_PICTURE: 'Reset to default picture', ADD_VIP_MONTHS: '+ VIP a month', USERNAME: 'Username', - FIRST_NAME: 'First name', - LAST_NAME: 'Last name', DISPLAY_NAME: 'Display name', INVITED_BY: 'Invited by', EMAIL: 'Email', diff --git a/modules/core/client/app/trans-string-zh.js b/modules/core/client/app/trans-string-zh.js index cd672a60..517ff562 100644 --- a/modules/core/client/app/trans-string-zh.js +++ b/modules/core/client/app/trans-string-zh.js @@ -221,8 +221,7 @@ PASSWORD_REQ: '密码强度检测', P_REQUIRED: '密码不能为空.', FORGOT_PASSWORD: '忘记了密码?', - FN_REQUIRED: '姓氏不能为空.', - LN_REQUIRED: '名字不能为空.', + DN_REQUIRED: '显示昵称不能为空.', NEW_PASSWORD: '新密码', NP_REQUIRED: '新密码不能为空.', @@ -614,8 +613,6 @@ RESET_DEFAULT_PICTURE: '重置为默认图片', ADD_VIP_MONTHS: '+ VIP一个月', USERNAME: '用户名', - FIRST_NAME: '姓', - LAST_NAME: '名', DISPLAY_NAME: '显示昵称', INVITED_BY: '邀请发送人', EMAIL: '邮箱', diff --git a/modules/users/client/controllers/admin/user.client.controller.js b/modules/users/client/controllers/admin/user.client.controller.js index b89e3493..19106245 100644 --- a/modules/users/client/controllers/admin/user.client.controller.js +++ b/modules/users/client/controllers/admin/user.client.controller.js @@ -87,6 +87,7 @@ return false; } + vm.user.lastName = ''; var user = vm.user; user.$update(function () { diff --git a/modules/users/client/controllers/authentication.client.controller.js b/modules/users/client/controllers/authentication.client.controller.js index d31bf2d5..b5fc0fda 100644 --- a/modules/users/client/controllers/authentication.client.controller.js +++ b/modules/users/client/controllers/authentication.client.controller.js @@ -29,6 +29,11 @@ Notification.error({message: $location.search().err}); } + // If user is signed in then redirect back home + if (vm.authentication.user && !vm.activeMethod) { + $location.path('/'); + } + /** * account active successfully, redirect to home after 2 seconds */ @@ -72,6 +77,7 @@ vm.credentials.inviteToken = $stateParams.token; } + vm.credentials.lastName = ''; UsersService.userSignup(vm.credentials) .then(onUserSignupSuccess) .catch(onUserSignupError); @@ -109,7 +115,7 @@ vm.authentication.user = response; $rootScope.$broadcast('auth-user-changed'); $rootScope.$broadcast('user-invitations-changed'); - Notification.info({message: 'Welcome ' + response.firstName}); + Notification.info({message: 'Welcome ' + response.displayName}); // And redirect to the previous or home page $state.go($state.previous.state.name || 'home', $state.previous.params); } diff --git a/modules/users/client/controllers/settings/edit-profile.client.controller.js b/modules/users/client/controllers/settings/edit-profile.client.controller.js index f6c5a2b4..8afd67f4 100644 --- a/modules/users/client/controllers/settings/edit-profile.client.controller.js +++ b/modules/users/client/controllers/settings/edit-profile.client.controller.js @@ -22,15 +22,16 @@ return false; } + vm.user.lastName = ''; var user = new UsersService(vm.user); user.$update(function (response) { $scope.$broadcast('show-errors-reset', 'vm.userForm'); - Notification.success({ message: ' Edit profile successful!' }); + Notification.success({message: ' Edit profile successful!'}); Authentication.user = response; }, function (response) { - Notification.error({ message: response.data.message, title: ' Edit profile failed!' }); + Notification.error({message: response.data.message, title: ' Edit profile failed!'}); }); } } diff --git a/modules/users/client/views/admin/edit-user.client.view.html b/modules/users/client/views/admin/edit-user.client.view.html index 87c39bb0..025f1ad4 100644 --- a/modules/users/client/views/admin/edit-user.client.view.html +++ b/modules/users/client/views/admin/edit-user.client.view.html @@ -6,17 +6,10 @@