33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
|
import {FormGroup} from '@angular/forms';
|
|
import {EnvProperties} from "../utils/properties/env-properties";
|
|
import {properties} from "../../../environments/environment";
|
|
|
|
@Component({
|
|
selector: 'contact-us',
|
|
templateUrl: './contact-us.component.html'
|
|
})
|
|
|
|
export class ContactUsComponent {
|
|
@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;
|
|
@Input() public scrollspy: boolean = false;
|
|
@Input() public sending: boolean = false;
|
|
@Output() sendEmitter: EventEmitter<any> = new EventEmitter<any>();
|
|
public properties: EnvProperties = properties;
|
|
|
|
public send() {
|
|
this.sendEmitter.emit({
|
|
valid: this.contactForm.valid
|
|
});
|
|
}
|
|
|
|
public handleRecaptcha(captchaResponse: string) {
|
|
this.contactForm.get('recaptcha').setValue(captchaResponse);
|
|
}
|
|
}
|