]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/admin/friends/friend-add/friend-add.component.html
Client: change url validation for friend add
[github/Chocobozzz/PeerTube.git] / client / src / app / admin / friends / friend-add / friend-add.component.html
CommitLineData
e105c19c
C
1<h3>Make friends</h3>
2
3<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
4
9e8aa10d 5<form (ngSubmit)="makeFriends()" [formGroup]="friendAddForm">
e105c19c
C
6 <div class="form-group" *ngFor="let url of urls; let id = index; trackBy:customTrackBy">
7 <label for="username">Url</label>
9e8aa10d 8
e105c19c 9 <div class="input-group">
9e8aa10d
C
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 />
e105c19c
C
14 <span class="input-group-btn">
15 <button *ngIf="displayAddField(id)" (click)="addField()" class="btn btn-default" type="button">+</button>
9e8aa10d 16 <button *ngIf="displayRemoveField(id)" (click)="removeField(id)" class="btn btn-default" type="button">-</button>
e105c19c
C
17 </span>
18 </div>
9e8aa10d
C
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>
e105c19c
C
23 </div>
24
9e8aa10d 25 <input type="submit" value="Make friends" class="btn btn-default" [disabled]="!isFormValid()">
e105c19c 26</form>