1 |
61381
|
k.triantaf
|
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
2 |
|
|
import {FormGroup} from '@angular/forms';
|
3 |
|
|
import {EnvProperties} from "../utils/properties/env-properties";
|
4 |
|
|
import {Observable} from "rxjs";
|
5 |
|
|
import {map, startWith} from "rxjs/operators";
|
6 |
|
|
|
7 |
|
|
@Component({
|
8 |
|
|
selector: 'contact-us',
|
9 |
|
|
templateUrl: './contact-us.component.html',
|
10 |
|
|
styleUrls: ['contact-us.component.css']
|
11 |
|
|
})
|
12 |
|
|
|
13 |
|
|
export class ContactUsComponent {
|
14 |
|
|
@Input()
|
15 |
|
|
public contactForm: FormGroup;
|
16 |
|
|
@Input() formTitle: string;
|
17 |
|
|
@Input() properties: EnvProperties;
|
18 |
|
|
@Output() sendEmitter: EventEmitter<any> = new EventEmitter<any>();
|
19 |
|
|
@Input() errorMessage;
|
20 |
|
|
@Input()
|
21 |
|
|
public organizationTypes: string[];
|
22 |
|
|
@Input()
|
23 |
|
|
public right: boolean = true;
|
24 |
|
|
@Input()
|
25 |
|
|
public buttonClass: string;
|
26 |
|
|
|
27 |
|
|
public send() {
|
28 |
|
|
this.sendEmitter.emit({
|
29 |
|
|
valid: this.contactForm.valid
|
30 |
|
|
});
|
31 |
|
|
}
|
32 |
|
|
|
33 |
|
|
public handleRecaptcha(captchaResponse: string) {
|
34 |
|
|
this.contactForm.get('recaptcha').setValue(captchaResponse);
|
35 |
|
|
}
|
36 |
|
|
}
|