Project

General

Profile

1
<form [formGroup]="myForm">
2
    <div class="form-group" [ngClass]="{'has-error':!myForm.controls.name.valid && myForm.controls.name.dirty}">
3
        <label for="entityNameTag">Entity Name</label>
4
        <input type="text" class="uk-input uk-width-medium" formControlName="name" id="entityNameTag" placeholder="Entity Name">
5
    </div>
6
    <div class="form-group" [ngClass]="{'has-error':!myForm.controls.pid.valid && myForm.controls.pid.dirty}">
7
        <label for="entityPidTag">Entity persistent id for portal</label>
8
        <input type="text" class="uk-input uk-width-medium" formControlName="pid" id="entityPidTag" placeholder="Entity Pid">
9
    </div>
10

    
11
<!--
12
    <div ngModelGroup="phoneNumbers">
13
      <h3>Phone numbers</h3>
14
      <div *ngFor="let phoneId of phoneNumberIds; let i=index;">
15
        <label>Phone number {{i + 1}}</label>
16
        <input type="text" name="phoneNumber[{{phoneId}}]" #phoneNumber="ngModel" ngModel/>
17
        <button type="button" (click)="remove(i); myForm.control.markAsTouched()">remove</button>
18
      </div>
19
      <button type="button" (click)="add(); myForm.control.markAsTouched()">Add phone number</button>
20
    </div>
21
-->
22

    
23
<!-- <div class="form-group" [ngClass]="{'has-error':!myForm.controls.name.valid && myForm.controls.entities.dirty}">
24
  <div *ngFor="let entity of entities; let i=index;">
25
    <label>Entity {{i + 1}}</label>
26
    <input type="text" name="entities[{{entity}}]" class="form-control" formControlName="entity"/>
27
  </div>
28
</div> -->
29

    
30

    
31
    <input type="hidden" formControlName="_id">
32
</form>
33
<!--<pre>-->
34
<!--{{myForm.value | json}}-->
35
<!--</pre>-->
(3-3/4)