diff options
Diffstat (limited to 'client/src/app/admin/friends/friend-add/friend-add.component.html')
-rw-r--r-- | client/src/app/admin/friends/friend-add/friend-add.component.html | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/client/src/app/admin/friends/friend-add/friend-add.component.html b/client/src/app/admin/friends/friend-add/friend-add.component.html index d8bb740b4..5b8dc8d87 100644 --- a/client/src/app/admin/friends/friend-add/friend-add.component.html +++ b/client/src/app/admin/friends/friend-add/friend-add.component.html | |||
@@ -2,17 +2,25 @@ | |||
2 | 2 | ||
3 | <div *ngIf="error" class="alert alert-danger">{{ error }}</div> | 3 | <div *ngIf="error" class="alert alert-danger">{{ error }}</div> |
4 | 4 | ||
5 | <form (ngSubmit)="makeFriends()"> | 5 | <form (ngSubmit)="makeFriends()" [formGroup]="friendAddForm"> |
6 | <div class="form-group" *ngFor="let url of urls; let id = index; trackBy:customTrackBy"> | 6 | <div class="form-group" *ngFor="let url of urls; let id = index; trackBy:customTrackBy"> |
7 | <label for="username">Url</label> | 7 | <label for="username">Url</label> |
8 | |||
8 | <div class="input-group"> | 9 | <div class="input-group"> |
9 | <input type="text" class="form-control" [name]="'url-' + id" [id]="'url-' + id" placeholder="http://domain.com" [(ngModel)]="urls[id]" /> | 10 | <input |
11 | type="text" class="form-control" placeholder="http://domain.com" | ||
12 | [name]="'url-' + id" [id]="'url-' + id" [formControlName]="'url-' + id" [(ngModel)]="urls[id]" | ||
13 | /> | ||
10 | <span class="input-group-btn"> | 14 | <span class="input-group-btn"> |
11 | <button *ngIf="displayAddField(id)" (click)="addField()" class="btn btn-default" type="button">+</button> | 15 | <button *ngIf="displayAddField(id)" (click)="addField()" class="btn btn-default" type="button">+</button> |
12 | <button *ngIf="displayRemoveField(id)" (click)="removeField(index)" class="btn btn-default" type="button">-</button> | 16 | <button *ngIf="displayRemoveField(id)" (click)="removeField(id)" class="btn btn-default" type="button">-</button> |
13 | </span> | 17 | </span> |
14 | </div> | 18 | </div> |
19 | |||
20 | <div [hidden]="friendAddForm.controls['url-' + id].valid || friendAddForm.controls['url-' + id].pristine" class="alert alert-warning"> | ||
21 | It should be a valid url. | ||
22 | </div> | ||
15 | </div> | 23 | </div> |
16 | 24 | ||
17 | <input type="submit" value="Make friends" class="btn btn-default"> | 25 | <input type="submit" value="Make friends" class="btn btn-default" [disabled]="!isFormValid()"> |
18 | </form> | 26 | </form> |