diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-08-23 14:37:49 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-08-23 14:37:49 +0200 |
commit | 0f6da32b148c0f4146b2ae9ad1add9a9f00cc339 (patch) | |
tree | 1272a5892e357aa0a0d370545effa6800092d568 /client/src/app/admin/friends | |
parent | 39f87cb21689a912559d0498641db7d2de4a784d (diff) | |
download | PeerTube-0f6da32b148c0f4146b2ae9ad1add9a9f00cc339.tar.gz PeerTube-0f6da32b148c0f4146b2ae9ad1add9a9f00cc339.tar.zst PeerTube-0f6da32b148c0f4146b2ae9ad1add9a9f00cc339.zip |
Client: update to new form api
Diffstat (limited to 'client/src/app/admin/friends')
-rw-r--r-- | client/src/app/admin/friends/friend-add/friend-add.component.html | 4 | ||||
-rw-r--r-- | client/src/app/admin/friends/friend-add/friend-add.component.ts | 2 |
2 files changed, 3 insertions, 3 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 a52965e8f..d8bb740b4 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,11 +2,11 @@ | |||
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 role="form" (ngSubmit)="makeFriends()"> | 5 | <form (ngSubmit)="makeFriends()"> |
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 | <div class="input-group"> | 8 | <div class="input-group"> |
9 | <input type="text" class="form-control" name="url" id="url" placeholder="http://domain.com" [(ngModel)]="urls[id]" /> | 9 | <input type="text" class="form-control" [name]="'url-' + id" [id]="'url-' + id" placeholder="http://domain.com" [(ngModel)]="urls[id]" /> |
10 | <span class="input-group-btn"> | 10 | <span class="input-group-btn"> |
11 | <button *ngIf="displayAddField(id)" (click)="addField()" class="btn btn-default" type="button">+</button> | 11 | <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> | 12 | <button *ngIf="displayRemoveField(id)" (click)="removeField(index)" class="btn btn-default" type="button">-</button> |
diff --git a/client/src/app/admin/friends/friend-add/friend-add.component.ts b/client/src/app/admin/friends/friend-add/friend-add.component.ts index 30dbf4d36..07888a781 100644 --- a/client/src/app/admin/friends/friend-add/friend-add.component.ts +++ b/client/src/app/admin/friends/friend-add/friend-add.component.ts | |||
@@ -53,7 +53,7 @@ export class FriendAddComponent { | |||
53 | return; | 53 | return; |
54 | } | 54 | } |
55 | 55 | ||
56 | const confirmMessage = 'Are you sure to make friends with:\n - ' + this.urls.join('\n - '); | 56 | const confirmMessage = 'Are you sure to make friends with:\n - ' + notEmptyUrls.join('\n - '); |
57 | if (!confirm(confirmMessage)) return; | 57 | if (!confirm(confirmMessage)) return; |
58 | 58 | ||
59 | this.friendService.makeFriends(notEmptyUrls).subscribe( | 59 | this.friendService.makeFriends(notEmptyUrls).subscribe( |