Add new inputs in contact us
This commit is contained in:
parent
bd0b7a9e9a
commit
d9496f061f
|
@ -3,55 +3,18 @@
|
||||||
<ng-content select="[page-description]"></ng-content>
|
<ng-content select="[page-description]"></ng-content>
|
||||||
<div class="uk-child-width-1-2@s uk-child-width-1-1 uk-grid uk-grid-margin-large" [attr.uk-scrollspy-class]="scrollspy?'':null"
|
<div class="uk-child-width-1-2@s uk-child-width-1-1 uk-grid uk-grid-margin-large" [attr.uk-scrollspy-class]="scrollspy?'':null"
|
||||||
[class.uk-grid-column-small]="smallForm" [formGroup]="contactForm" uk-grid>
|
[class.uk-grid-column-small]="smallForm" [formGroup]="contactForm" uk-grid>
|
||||||
<div *ngIf="contactForm.get('name')">
|
<div *ngIf="contactForm.get('name')" input [placeholder]="{label: 'Name', static: true}" [formInput]="contactForm.get('name')"></div>
|
||||||
<input class="uk-input" type="text" placeholder="Name *" formControlName="name"
|
<div *ngIf="contactForm.get('surname')" input placeholder="Surname" [formInput]="contactForm.get('surname')"></div>
|
||||||
[class.uk-form-danger]="contactForm.get('name').invalid && contactForm.get('name').touched">
|
<div *ngIf="contactForm.get('email')" input placeholder="Email" [formInput]="contactForm.get('email')"></div>
|
||||||
</div>
|
<div *ngIf="contactForm.get('job')" input placeholder="Job Title" [formInput]="contactForm.get('job')"></div>
|
||||||
<div *ngIf="contactForm.get('surname')">
|
<div *ngIf="contactForm.get('affiliation')" input placeholder="Affiliation" [formInput]="contactForm.get('affiliation')"></div>
|
||||||
<input class="uk-input" type="text" placeholder="Surname *" formControlName="surname"
|
<div *ngIf="contactForm.get('community')" input placeholder="Research Community or Infrastructure" [formInput]="contactForm.get('community')"></div>
|
||||||
[class.uk-form-danger]="contactForm.get('surname').invalid && contactForm.get('surname').touched">
|
<div *ngIf="contactForm.get('organization')" input placeholder="Organization" [formInput]="contactForm.get('organization')"></div>
|
||||||
</div>
|
<div *ngIf="contactForm.get('organizationType')" input type="select" placeholder="Organization Type"
|
||||||
<div *ngIf="contactForm.get('email')">
|
[formInput]="contactForm.get('organizationType')" [options]="organizationTypes"></div>
|
||||||
<input class="uk-input" type="text" placeholder="Email *" formControlName="email"
|
<div *ngIf="contactForm.get('subject')" class="uk-width-1-1" input placeholder="Subject" [formInput]="contactForm.get('subject')"></div>
|
||||||
[class.uk-form-danger]="contactForm.get('email').invalid && contactForm.get('email').touched">
|
<div *ngIf="contactForm.get('message')" class="uk-width-1-1" input type="textarea" rows="4" placeholder="Comments" [formInput]="contactForm.get('message')"></div>
|
||||||
</div>
|
<div *ngIf="contactForm.get('description')" class="uk-width-1-1" input type="textarea" rows="4" placeholder="Description" [formInput]="contactForm.get('description')"></div>
|
||||||
<div *ngIf="contactForm.get('job')">
|
|
||||||
<input class="uk-input" type="text" placeholder="Job Title *" formControlName="job"
|
|
||||||
[class.uk-form-danger]="contactForm.get('job').invalid && contactForm.get('job').touched">
|
|
||||||
</div>
|
|
||||||
<div *ngIf="contactForm.get('affiliation')">
|
|
||||||
<input class="uk-input" type="text" placeholder="Affiliation *" formControlName="affiliation"
|
|
||||||
[class.uk-form-danger]="contactForm.get('affiliation').invalid && contactForm.get('affiliation').touched">
|
|
||||||
</div>
|
|
||||||
<div *ngIf="contactForm.get('community')">
|
|
||||||
<input class="uk-input uk-width-1" type="text" placeholder="Research Community or Infrastructure *"
|
|
||||||
formControlName="community"
|
|
||||||
[class.uk-form-danger]="contactForm.get('community').invalid && contactForm.get('community').touched">
|
|
||||||
</div>
|
|
||||||
<div *ngIf="contactForm.get('organization')">
|
|
||||||
<input class="uk-input uk-width-1-1" type="text" placeholder="Organization *" formControlName="organization"
|
|
||||||
[class.uk-form-danger]="contactForm.get('organization').invalid && contactForm.get('organization').touched">
|
|
||||||
</div>
|
|
||||||
<div *ngIf="contactForm.get('organizationType')">
|
|
||||||
<select class="uk-select uk-width-1-1" formControlName="organizationType">
|
|
||||||
<option [value]="''" hidden selected>Organization Type *</option>
|
|
||||||
<option *ngFor="let option of organizationTypes" [value]="option">{{option}}</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="contactForm.get('subject')" class="uk-width-1-1">
|
|
||||||
<input class="uk-input uk-width-1-1" type="text" placeholder="Subject *" formControlName="subject"
|
|
||||||
[class.uk-form-danger]="contactForm.get('subject').invalid && contactForm.get('subject').touched">
|
|
||||||
</div>
|
|
||||||
<div *ngIf="contactForm.get('message')" class="uk-width-1-1">
|
|
||||||
<textarea rows="4" class="uk-textarea" placeholder="Comments *" formControlName="message"
|
|
||||||
[class.uk-form-danger]="contactForm.get('message').invalid && contactForm.get('message').touched">
|
|
||||||
</textarea>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="contactForm.get('description')">
|
|
||||||
<textarea rows="4" class="uk-textarea" placeholder="Description *" formControlName="description"
|
|
||||||
[class.uk-form-danger]="contactForm.get('description').invalid && contactForm.get('description').touched">
|
|
||||||
</textarea>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="contactForm.get('recaptcha')" class="uk-flex uk-flex-center" [class.uk-width-1-1]="smallForm" [class.uk-flex-last@s]="!smallForm">
|
<div *ngIf="contactForm.get('recaptcha')" class="uk-flex uk-flex-center" [class.uk-width-1-1]="smallForm" [class.uk-flex-last@s]="!smallForm">
|
||||||
<re-captcha (resolved)="handleRecaptcha($event)" [(siteKey)]="properties.reCaptchaSiteKey">
|
<re-captcha (resolved)="handleRecaptcha($event)" [(siteKey)]="properties.reCaptchaSiteKey">
|
||||||
</re-captcha>
|
</re-captcha>
|
||||||
|
|
|
@ -8,11 +8,12 @@ import {MatAutocompleteModule} from "@angular/material/autocomplete";
|
||||||
import {RecaptchaModule} from "ng-recaptcha";
|
import {RecaptchaModule} from "ng-recaptcha";
|
||||||
import {SafeHtmlPipeModule} from "../utils/pipes/safeHTMLPipe.module";
|
import {SafeHtmlPipeModule} from "../utils/pipes/safeHTMLPipe.module";
|
||||||
import {LoadingModule} from "../utils/loading/loading.module";
|
import {LoadingModule} from "../utils/loading/loading.module";
|
||||||
|
import {InputModule} from "../sharedComponents/input/input.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, RouterModule,
|
CommonModule, RouterModule,
|
||||||
ReactiveFormsModule, MatAutocompleteModule, RecaptchaModule, SafeHtmlPipeModule, LoadingModule],
|
ReactiveFormsModule, MatAutocompleteModule, RecaptchaModule, SafeHtmlPipeModule, LoadingModule, InputModule],
|
||||||
declarations: [
|
declarations: [
|
||||||
ContactUsComponent
|
ContactUsComponent
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue