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/videos/video-add/video-add.component.html | |
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/videos/video-add/video-add.component.html')
-rw-r--r-- | client/src/app/videos/video-add/video-add.component.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/client/src/app/videos/video-add/video-add.component.html b/client/src/app/videos/video-add/video-add.component.html index bcd78c7cb..76bb61f7d 100644 --- a/client/src/app/videos/video-add/video-add.component.html +++ b/client/src/app/videos/video-add/video-add.component.html | |||
@@ -2,14 +2,14 @@ | |||
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 novalidate (ngSubmit)="upload()" [ngFormModel]="videoForm"> | 5 | <form novalidate (ngSubmit)="upload()" [formGroup]="videoForm"> |
6 | <div class="form-group"> | 6 | <div class="form-group"> |
7 | <label for="name">Name</label> | 7 | <label for="name">Name</label> |
8 | <input | 8 | <input |
9 | type="text" class="form-control" name="name" id="name" | 9 | type="text" class="form-control" name="name" id="name" |
10 | ngControl="name" #name="ngForm" [(ngModel)]="video.name" | 10 | [(ngModel)]="video.name" |
11 | > | 11 | > |
12 | <div [hidden]="name.valid || name.pristine" class="alert alert-warning"> | 12 | <div [hidden]="videoForm.controls.name.valid || videoForm.controls.name.pristine" class="alert alert-warning"> |
13 | A name is required and should be between 3 and 50 characters long | 13 | A name is required and should be between 3 and 50 characters long |
14 | </div> | 14 | </div> |
15 | </div> | 15 | </div> |
@@ -18,9 +18,9 @@ | |||
18 | <label for="tags">Tags</label> | 18 | <label for="tags">Tags</label> |
19 | <input | 19 | <input |
20 | type="text" class="form-control" name="tags" id="tags" | 20 | type="text" class="form-control" name="tags" id="tags" |
21 | ngControl="tags" #tags="ngForm" [disabled]="isTagsInputDisabled" (keyup)="onTagKeyPress($event)" [(ngModel)]="currentTag" | 21 | [disabled]="isTagsInputDisabled" (keyup)="onTagKeyPress($event)" [(ngModel)]="currentTag" |
22 | > | 22 | > |
23 | <div [hidden]="tags.valid || tags.pristine" class="alert alert-warning"> | 23 | <div [hidden]="videoForm.controls.tags.valid || videoForm.controls.tags.pristine" class="alert alert-warning"> |
24 | A tag should be between 2 and 10 characters (alphanumeric) long | 24 | A tag should be between 2 and 10 characters (alphanumeric) long |
25 | </div> | 25 | </div> |
26 | </div> | 26 | </div> |
@@ -54,10 +54,10 @@ | |||
54 | <label for="description">Description</label> | 54 | <label for="description">Description</label> |
55 | <textarea | 55 | <textarea |
56 | name="description" id="description" class="form-control" placeholder="Description..." | 56 | name="description" id="description" class="form-control" placeholder="Description..." |
57 | ngControl="description" #description="ngForm" [(ngModel)]="video.description" | 57 | [(ngModel)]="video.description" |
58 | > | 58 | > |
59 | </textarea> | 59 | </textarea> |
60 | <div [hidden]="description.valid || description.pristine" class="alert alert-warning"> | 60 | <div [hidden]="videoForm.controls.description.valid || videoForm.controls.description.pristine" class="alert alert-warning"> |
61 | A description is required and should be between 3 and 250 characters long | 61 | A description is required and should be between 3 and 250 characters long |
62 | </div> | 62 | </div> |
63 | </div> | 63 | </div> |