[Explore | master & Library | angular-14]: composer.ts: [Bug fix] Add parenthesis around ternary operator in method composeEmailForExplore() - empty or wrong body | contact-us.component.html: Added #captchaElem in <re-captcha> | contact-us.component.ts: Added ViewChild for captchaElem and added method "resetRecaptcha()" | contact.component.html: Added #contactUs in <contact-us> | contact.component.ts: Added ViewChild for contactUs and call contactUsComponent.resetRecaptcha() on reset method.

master
Konstantina Galouni 1 year ago
parent d715e0a281
commit 0377810717

@ -7,7 +7,7 @@
<div class="uk-section uk-padding-remove-top uk-container uk-container-large uk-flex uk-flex-center"
uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
<div class="uk-padding-small uk-width-1-2@l uk-width-2-3@m uk-width-1-1">
<contact-us [sending]="sending" [scrollspy]="true"
<contact-us #contactUs [sending]="sending" [scrollspy]="true"
[contactForm]="contactForm" (sendEmitter)="send($event)">
<h1 page-title class="uk-margin-auto uk-text-center" uk-scrollspy-class>
Contact us to <br> learn more<span class="uk-text-primary">.</span>

@ -14,6 +14,7 @@ import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.compo
import {Subscriber} from "rxjs";
import {properties} from "../../environments/environment";
import {NotificationHandler} from "../openaireLibrary/utils/notification-handler";
import {ContactUsComponent} from "../openaireLibrary/contact-us/contact-us.component";
@Component({
selector: 'contact',
@ -33,7 +34,8 @@ export class ContactComponent implements OnInit {
public contactForm: FormGroup;
@ViewChild('modal') modal;
private subscriptions = [];
@ViewChild('contactUs') contactUsComponent : ContactUsComponent;
ngOnDestroy() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
@ -94,6 +96,9 @@ export class ContactComponent implements OnInit {
message: this.fb.control('', Validators.required),
recaptcha: this.fb.control('', Validators.required),
});
if(this.contactUsComponent) {
this.contactUsComponent.resetRecaptcha();
}
}
private sendMail(admins: any) {

@ -1 +1 @@
Subproject commit f91c3ba0fb4c6c70b76ef54203258d454bf7fc18
Subproject commit 062f1a23c4f55a1d98c185f53f490795c4c89145

@ -1 +1 @@
Subproject commit d772dbd4b2f2d8af9e26d98eed7417f2fbf15c3a
Subproject commit 0c6b2ac12b4796e41bf4cc8de93c157efa866543

@ -1 +1 @@
Subproject commit 2882ccde4eb93bd01b4cdb480790cc04b394794d
Subproject commit 996b48573c7cc42a8c50ac447f1fd84c7f0836c4
Loading…
Cancel
Save