[Monitor | Trunk]: Contact: on email send failed show a message

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor@59362 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Konstantinos Triantafyllou 2020-09-14 07:49:31 +00:00
parent 3c39a91105
commit 11826e33fa
1 changed files with 4 additions and 1 deletions

View File

@ -118,10 +118,13 @@ export class ContactComponent implements OnInit {
Composer.composeEmailForMonitor(this.contactForm.value, admins),
this.contactForm.value.recaptcha).subscribe(
res => {
this.showLoading = false;
if (res) {
this.reset();
this.modalOpen();
this.showLoading = false;
} else {
this.errorMessage = 'Email sent failed! Please try again.';
this.contactForm.get('recaptcha').setValue('');
}
},
error => {