aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-10-17 21:14:13 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-10-17 21:14:13 +0200
commit464853031832d39eb42807436b4b714798fcb729 (patch)
treef3b67cff063718b990be54bd9084c917f953e549 /client/src
parent25cad919924faebda48f8741d3e6e0c3e23c6182 (diff)
downloadPeerTube-464853031832d39eb42807436b4b714798fcb729.tar.gz
PeerTube-464853031832d39eb42807436b4b714798fcb729.tar.zst
PeerTube-464853031832d39eb42807436b4b714798fcb729.zip
Client: fix form upload validation on key enter
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/videos/video-add/video-add.component.html7
-rw-r--r--client/src/app/videos/video-add/video-add.component.ts1
2 files changed, 5 insertions, 3 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 64320cae7..14c7a0136 100644
--- a/client/src/app/videos/video-add/video-add.component.html
+++ b/client/src/app/videos/video-add/video-add.component.html
@@ -2,7 +2,7 @@
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()" [formGroup]="form"> 5<form novalidate [formGroup]="form">
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
@@ -68,8 +68,9 @@
68 68
69 <div class="form-group"> 69 <div class="form-group">
70 <input 70 <input
71 type="submit" value="Upload" class="btn btn-default form-control" [title]="getInvalidFieldsTitle()" 71 type="button" value="Upload" class="btn btn-default form-control"
72 [disabled]="!form.valid || tags.length === 0 || filename === null" 72 [title]="getInvalidFieldsTitle()" [disabled]="!form.valid || tags.length === 0 || filename === null"
73 (click)="upload()"
73 > 74 >
74 </div> 75 </div>
75</form> 76</form>
diff --git a/client/src/app/videos/video-add/video-add.component.ts b/client/src/app/videos/video-add/video-add.component.ts
index 0a8b8293b..b7bf1534f 100644
--- a/client/src/app/videos/video-add/video-add.component.ts
+++ b/client/src/app/videos/video-add/video-add.component.ts
@@ -130,6 +130,7 @@ export class VideoAddComponent extends FormReactive implements OnInit {
130 130
131 removeTag(tag: string) { 131 removeTag(tag: string) {
132 this.tags.splice(this.tags.indexOf(tag), 1); 132 this.tags.splice(this.tags.indexOf(tag), 1);
133 this.form.get('currentTag').enable();
133 } 134 }
134 135
135 upload() { 136 upload() {