Client: fix form upload validation on key enter
This commit is contained in:
parent
25cad91992
commit
4648530318
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
|
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
|
||||||
|
|
||||||
<form novalidate (ngSubmit)="upload()" [formGroup]="form">
|
<form novalidate [formGroup]="form">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name">Name</label>
|
<label for="name">Name</label>
|
||||||
<input
|
<input
|
||||||
|
@ -68,8 +68,9 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input
|
<input
|
||||||
type="submit" value="Upload" class="btn btn-default form-control" [title]="getInvalidFieldsTitle()"
|
type="button" value="Upload" class="btn btn-default form-control"
|
||||||
[disabled]="!form.valid || tags.length === 0 || filename === null"
|
[title]="getInvalidFieldsTitle()" [disabled]="!form.valid || tags.length === 0 || filename === null"
|
||||||
|
(click)="upload()"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -130,6 +130,7 @@ export class VideoAddComponent extends FormReactive implements OnInit {
|
||||||
|
|
||||||
removeTag(tag: string) {
|
removeTag(tag: string) {
|
||||||
this.tags.splice(this.tags.indexOf(tag), 1);
|
this.tags.splice(this.tags.indexOf(tag), 1);
|
||||||
|
this.form.get('currentTag').enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
upload() {
|
upload() {
|
||||||
|
|
Loading…
Reference in New Issue