Revision 58534
Added by Konstantinos Triantafyllou almost 4 years ago
modules/uoa-services-library/trunk/ng-openaire-library/src/app/contact-us/contact-us.component.html | ||
---|---|---|
33 | 33 |
<input class="uk-input" type="text" placeholder="Your affiliation" formControlName="affiliation" |
34 | 34 |
[class.uk-form-danger]="contactForm.get('affiliation').invalid && contactForm.get('affiliation').touched"> |
35 | 35 |
</div> |
36 |
<div *ngIf="contactForm.get('community')" class="uk-width-1-2@s uk-margin-top">
|
|
37 |
<label class="uk-h5 uk-text-bold">
|
|
38 |
Community Name <span class="uk-text-danger uk-text-bold">*</span>
|
|
39 |
</label>
|
|
40 |
<input class="uk-input" type="text" placeholder="Your community name" formControlName="community" |
|
36 |
<div *ngIf="contactForm.get('community')" class="uk-width-1-1 uk-margin-top">
|
|
37 |
<div class="uk-h5 uk-width-1-1 uk-text-bold uk-margin-remove-bottom">
|
|
38 |
Research Community or Infrastructure <span class="uk-text-danger uk-text-bold">*</span>
|
|
39 |
</div>
|
|
40 |
<input class="uk-input uk-width-1-2@s" type="text" placeholder="Your community name" formControlName="community"
|
|
41 | 41 |
[class.uk-form-danger]="contactForm.get('community').invalid && contactForm.get('community').touched"> |
42 | 42 |
</div> |
43 | 43 |
<div *ngIf="contactForm.get('funder')" class="uk-width-1-2@s uk-margin-top"> |
... | ... | |
55 | 55 |
[class.uk-form-danger]="contactForm.get('message').invalid && contactForm.get('message').touched"> |
56 | 56 |
</textarea> |
57 | 57 |
</div> |
58 |
<div *ngIf="contactForm.get('message')" class="uk-width-1-1 uk-margin-top">
|
|
58 |
<div *ngIf="contactForm.get('message')" class="uk-width-1-2@s uk-margin-top">
|
|
59 | 59 |
<re-captcha (resolved)="handleRecaptcha($event)" [(siteKey)]="properties.reCaptchaSiteKey"> |
60 | 60 |
</re-captcha> |
61 | 61 |
</div> |
62 |
<div class="uk-width-1-1 uk-text-right"> |
|
63 |
<button class="uk-button uk-button-default uk-margin-small-right" |
|
64 |
(click)="reset()">Reset</button> |
|
62 |
<div class="uk-width-1-2@s uk-text-right uk-margin-medium-top"> |
|
65 | 63 |
<button class="uk-button portal-button" (click)="send()">Send</button> |
66 | 64 |
</div> |
67 | 65 |
</div> |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/contact-us/contact-us.component.ts | ||
---|---|---|
13 | 13 |
@Input() formTitle: string; |
14 | 14 |
@Input() properties: EnvProperties; |
15 | 15 |
@Output() sendEmitter: EventEmitter<any> = new EventEmitter<any>(); |
16 |
@Output() resetEmitter: EventEmitter<any> = new EventEmitter<any>(); |
|
17 | 16 |
@Input() errorMessage; |
18 | 17 |
|
19 | 18 |
constructor() { |
... | ... | |
28 | 27 |
}); |
29 | 28 |
} |
30 | 29 |
|
31 |
public reset() { |
|
32 |
this.resetEmitter.emit(); |
|
33 |
} |
|
34 |
|
|
35 |
|
|
36 | 30 |
public handleRecaptcha(captchaResponse: string) { |
37 | 31 |
this.contactForm.get('recaptcha').setValue(captchaResponse); |
38 | 32 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/helper/helper.service.ts | ||
---|---|---|
2 | 2 |
import {HttpClient} from "@angular/common/http"; |
3 | 3 |
|
4 | 4 |
|
5 |
import {EnvProperties} from '../properties/env-properties'; |
|
5 | 6 |
|
6 |
import{EnvProperties} from '../properties/env-properties'; |
|
7 |
|
|
8 | 7 |
@Injectable() |
9 | 8 |
export class HelperService { |
10 | 9 |
constructor(private http: HttpClient) {} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/helper/helper.component.ts | ||
---|---|---|
1 |
import { Component, Input } from '@angular/core'; |
|
2 |
import {ActivatedRoute} from '@angular/router'; |
|
1 |
import {Component, Input} from '@angular/core'; |
|
3 | 2 |
import 'rxjs'; |
4 |
import {HelperService} from './helper.service'; |
|
5 |
import{EnvProperties} from '../properties/env-properties'; |
|
6 |
import {ConnectHelper} from '../../connect/connectHelper'; |
|
7 |
import {SafeHtmlPipe} from '../pipes/safeHTML.pipe'; |
|
8 | 3 |
|
9 | 4 |
@Component({ |
10 | 5 |
selector: 'helper', |
... | ... | |
26 | 21 |
@Input() style:boolean = false; |
27 | 22 |
@Input() styleName:string = ''; |
28 | 23 |
@Input() tooltip:boolean = false; |
24 |
|
|
29 | 25 |
constructor () {} |
30 | 26 |
|
31 | 27 |
buildTooltip(): string { |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/pipes/safeHTML.pipe.ts | ||
---|---|---|
1 |
//our root app component |
|
2 | 1 |
import { Pipe, PipeTransform} from '@angular/core' |
3 | 2 |
|
4 | 3 |
import { DomSanitizer, SafeUrl } from '@angular/platform-browser' |
... | ... | |
6 | 5 |
@Pipe({ name: 'safeHtml'}) |
7 | 6 |
export class SafeHtmlPipe implements PipeTransform { |
8 | 7 |
constructor(private sanitized: DomSanitizer) {} |
8 |
|
|
9 | 9 |
transform(value):SafeUrl { |
10 |
return this.sanitized.bypassSecurityTrustHtml(value); |
|
10 |
return this.sanitized.bypassSecurityTrustHtml(value.replace(/ /g,''));
|
|
11 | 11 |
} |
12 | 12 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/breadcrumbs/breadcrumbs.component.ts | ||
---|---|---|
1 |
import {Component, Input} from "@angular/core"; |
|
2 |
|
|
3 |
export interface Breadcrumb { |
|
4 |
name: string; |
|
5 |
route?: string; |
|
6 |
} |
|
7 |
|
|
8 |
@Component({ |
|
9 |
selector: 'breadcrumbs', |
|
10 |
template: ` |
|
11 |
<ul class="uk-breadcrumb" [class.uk-light]="light"> |
|
12 |
<li *ngFor="let breadcrumb of breadcrumbs"> |
|
13 |
<a class="uk-text-capitalize" *ngIf="breadcrumb.route" [routerLink]="breadcrumb.route">{{breadcrumb.name}}</a> |
|
14 |
<span class="uk-text-capitalize" *ngIf="!breadcrumb.route">{{breadcrumb.name}}</span> |
|
15 |
</li> |
|
16 |
</ul>` |
|
17 |
}) |
|
18 |
export class BreadcrumbsComponent { |
|
19 |
|
|
20 |
@Input() public light: boolean = false; |
|
21 |
@Input() public breadcrumbs: Breadcrumb[] = []; |
|
22 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/breadcrumbs/breadcrumbs.module.ts | ||
---|---|---|
1 |
import {NgModule} from "@angular/core"; |
|
2 |
import {CommonModule} from "@angular/common"; |
|
3 |
import {BreadcrumbsComponent} from "./breadcrumbs.component"; |
|
4 |
import {RouterModule} from "@angular/router"; |
|
5 |
|
|
6 |
@NgModule({ |
|
7 |
imports: [CommonModule, RouterModule], |
|
8 |
declarations: [BreadcrumbsComponent], |
|
9 |
exports: [BreadcrumbsComponent] |
|
10 |
}) |
|
11 |
export class BreadcrumbsModule {} |
Also available in: Unified diff
[Library | Trunk]: Add breadcrumbs. Fix space on check icons. Remove reset from contact us