diff --git a/contact-us/contact-us.component.html b/contact-us/contact-us.component.html index 11285a71..ad78e795 100644 --- a/contact-us/contact-us.component.html +++ b/contact-us/contact-us.component.html @@ -26,7 +26,7 @@
- +
diff --git a/contact-us/contact-us.component.ts b/contact-us/contact-us.component.ts index 19c1a9dc..e86006a2 100644 --- a/contact-us/contact-us.component.ts +++ b/contact-us/contact-us.component.ts @@ -1,7 +1,8 @@ -import {Component, EventEmitter, Input, Output} from '@angular/core'; +import {Component, EventEmitter, Input, Output, ViewChild} from '@angular/core'; import {FormGroup} from '@angular/forms'; import {EnvProperties} from "../utils/properties/env-properties"; import {properties} from "../../../environments/environment"; +import {RecaptchaComponent} from "ng-recaptcha"; @Component({ selector: 'contact-us', @@ -18,6 +19,8 @@ export class ContactUsComponent { @Input() public scrollspy: boolean = false; @Input() public sending: boolean = false; @Output() sendEmitter: EventEmitter = new EventEmitter(); + @ViewChild('captchaElem') captchaElem: RecaptchaComponent; + public properties: EnvProperties = properties; public send() { @@ -29,4 +32,8 @@ export class ContactUsComponent { public handleRecaptcha(captchaResponse: string) { this.contactForm.get('recaptcha').setValue(captchaResponse); } + + public resetRecaptcha() { + this.captchaElem.reset(); + } } diff --git a/utils/email/composer.ts b/utils/email/composer.ts index 4fc023a1..14de4338 100644 --- a/utils/email/composer.ts +++ b/utils/email/composer.ts @@ -86,7 +86,7 @@ export class Composer { + "Name: " + contactForm.name + "
" + "Surname: " + contactForm.surname + "
" + "Email: " + contactForm.email + "
" - + "Affiliation: " + contactForm.affiliation ? contactForm.affiliation : '-' + "
" + + "Affiliation: " + (contactForm.affiliation ? contactForm.affiliation : '-') + "
" + "

" + contactForm.message + "

" + "
"; email.recipients = admins;