mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[CST-6932] behavior on the registration page should be the same as the behavior on the change password page
This commit is contained in:
@@ -41,6 +41,11 @@ export class CreateProfileComponent implements OnInit {
|
||||
userInfoForm: FormGroup;
|
||||
activeLangs: LangConfig[];
|
||||
|
||||
/**
|
||||
* Prefix for the notification messages of this security form
|
||||
*/
|
||||
NOTIFICATIONS_PREFIX = 'register-page.create-profile.submit.';
|
||||
|
||||
constructor(
|
||||
private translateService: TranslateService,
|
||||
private ePersonDataService: EPersonDataService,
|
||||
@@ -161,13 +166,12 @@ export class CreateProfileComponent implements OnInit {
|
||||
getFirstCompletedRemoteData(),
|
||||
).subscribe((rd: RemoteData<EPerson>) => {
|
||||
if (rd.hasSucceeded) {
|
||||
this.notificationsService.success(this.translateService.get('register-page.create-profile.submit.success.head'),
|
||||
this.translateService.get('register-page.create-profile.submit.success.content'));
|
||||
this.notificationsService.success(this.translateService.get(this.NOTIFICATIONS_PREFIX + 'success.head'),
|
||||
this.translateService.get(this.NOTIFICATIONS_PREFIX + 'success.content'));
|
||||
this.store.dispatch(new AuthenticateAction(this.email, this.password));
|
||||
this.router.navigate(['/home']);
|
||||
} else {
|
||||
this.notificationsService.error(this.translateService.get('register-page.create-profile.submit.error.head'),
|
||||
this.translateService.get('register-page.create-profile.submit.error.content'));
|
||||
this.notificationsService.error(this.translateService.get(this.NOTIFICATIONS_PREFIX + 'error.head'), rd.errorMessage);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user