diff --git a/web-ui/src/app/app.component.ts b/web-ui/src/app/app.component.ts index 5089420..78a8b03 100644 --- a/web-ui/src/app/app.component.ts +++ b/web-ui/src/app/app.component.ts @@ -23,6 +23,9 @@ export class AppComponent { } englishLang(): Object { - return {}; + return { + 'action.find': 'Find', + 'label.transactionId': 'Transaction Id' + }; } } diff --git a/web-ui/src/app/components/transaction-finder/transaction-finder.component.html b/web-ui/src/app/components/transaction-finder/transaction-finder.component.html index 60d9e71..d2d9e68 100644 --- a/web-ui/src/app/components/transaction-finder/transaction-finder.component.html +++ b/web-ui/src/app/components/transaction-finder/transaction-finder.component.html @@ -1,3 +1,12 @@ -
- transaction-finder works! -
+ diff --git a/web-ui/src/app/components/transaction-finder/transaction-finder.component.ts b/web-ui/src/app/components/transaction-finder/transaction-finder.component.ts index 12c67c5..7d6648b 100644 --- a/web-ui/src/app/components/transaction-finder/transaction-finder.component.ts +++ b/web-ui/src/app/components/transaction-finder/transaction-finder.component.ts @@ -1,4 +1,6 @@ import { Component, OnInit } from '@angular/core'; +import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { Observable } from 'rxjs/Observable'; @Component({ selector: 'app-transaction-finder', @@ -7,9 +9,22 @@ import { Component, OnInit } from '@angular/core'; }) export class TransactionFinderComponent implements OnInit { - constructor() { } + form: FormGroup; + + constructor(private formBuilder: FormBuilder) { + this.createForm(); + } ngOnInit() { } + private createForm() { + this.form = this.formBuilder.group({ + transactionId: [null, [Validators.required, Validators.pattern('^[A-Fa-f0-9]{64}$')]], + }); + } + + onSubmit() { + console.log('submit now!'); + } }