mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[task 97198] fix merge mistakes
This commit is contained in:
@@ -86,6 +86,14 @@ export class RegisterEmailFormComponent implements OnInit {
|
||||
})
|
||||
});
|
||||
this.validMailDomains = [];
|
||||
this.configService.findByPropertyName('authentication-password.domain.valid')
|
||||
.pipe(getAllCompletedRemoteData())
|
||||
.subscribe((remoteData) => {
|
||||
for (const remoteValue of remoteData.payload.values) {
|
||||
this.validMailDomains.push(remoteValue);
|
||||
}
|
||||
}
|
||||
);
|
||||
this.configService.findByPropertyName('registration.verification.enabled').pipe(
|
||||
getFirstSucceededRemoteDataPayload(),
|
||||
map((res: ConfigurationProperty) => res?.values[0].toLowerCase() === 'true')
|
||||
@@ -151,12 +159,14 @@ export class RegisterEmailFormComponent implements OnInit {
|
||||
]);
|
||||
let registerEmail$ = captchaToken ?
|
||||
this.epersonRegistrationService.registerEmail(this.email.value, captchaToken, typeMap.get(this.MESSAGE_PREFIX)) :
|
||||
this.epersonRegistrationService.registerEmail(this.email.value,typeMap.get(this.MESSAGE_PREFIX));
|
||||
this.epersonRegistrationService.registerEmail(this.email.value, null, typeMap.get(this.MESSAGE_PREFIX));
|
||||
registerEmail$.subscribe((response: RemoteData<Registration>) => {
|
||||
if (response.hasSucceeded) {
|
||||
this.notificationService.success(this.translateService.get(`${this.MESSAGE_PREFIX}.success.head`),
|
||||
this.translateService.get(`${this.MESSAGE_PREFIX}.success.content`, {email: this.email.value}));
|
||||
this.router.navigate(['/home']);
|
||||
} else if (response.statusCode === 400) {
|
||||
this.notificationService.error(this.translateService.get(`${this.MESSAGE_PREFIX}.error.head`), this.translateService.get(`${this.MESSAGE_PREFIX}.error.maildomain`, {domains: this.validMailDomains.join(', ')}));
|
||||
} else {
|
||||
this.notificationService.error(this.translateService.get(`${this.MESSAGE_PREFIX}.error.head`),
|
||||
this.translateService.get(`${this.MESSAGE_PREFIX}.error.content`, {email: this.email.value}));
|
||||
|
Reference in New Issue
Block a user