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