2022-02-24 17:42:05 +01:00
|
|
|
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
2019-12-03 13:50:39 +01:00
|
|
|
import {FormGroup} from '@angular/forms';
|
|
|
|
import {EnvProperties} from "../utils/properties/env-properties";
|
2022-02-24 17:42:05 +01:00
|
|
|
import {properties} from "../../../environments/environment";
|
2019-12-03 13:50:39 +01:00
|
|
|
|
|
|
|
@Component({
|
2020-06-23 22:50:46 +02:00
|
|
|
selector: 'contact-us',
|
2022-01-12 13:12:30 +01:00
|
|
|
templateUrl: './contact-us.component.html'
|
2019-12-03 13:50:39 +01:00
|
|
|
})
|
|
|
|
|
2021-04-08 17:23:41 +02:00
|
|
|
export class ContactUsComponent {
|
2022-02-24 17:42:05 +01:00
|
|
|
@Input() public contactForm: FormGroup;
|
|
|
|
@Input() public formTitle: string;
|
|
|
|
@Input() public organizationTypes: string[];
|
|
|
|
@Input() public buttonClass: string;
|
|
|
|
@Input() public sendButton: string = "Send";
|
|
|
|
@Input() public smallForm: boolean = false;
|
2022-03-01 20:09:14 +01:00
|
|
|
@Input() public scrollspy: boolean = false;
|
2022-02-24 17:42:05 +01:00
|
|
|
@Input() public sending: boolean = false;
|
2020-06-23 22:50:46 +02:00
|
|
|
@Output() sendEmitter: EventEmitter<any> = new EventEmitter<any>();
|
2022-02-24 17:42:05 +01:00
|
|
|
public properties: EnvProperties = properties;
|
2020-06-23 22:50:46 +02:00
|
|
|
|
|
|
|
public send() {
|
|
|
|
this.sendEmitter.emit({
|
|
|
|
valid: this.contactForm.valid
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public handleRecaptcha(captchaResponse: string) {
|
|
|
|
this.contactForm.get('recaptcha').setValue(captchaResponse);
|
|
|
|
}
|
2019-12-03 13:50:39 +01:00
|
|
|
}
|