]>
Commit | Line | Data |
---|---|---|
1 | <h3>Update {{ video?.name }}</h3> | |
2 | ||
3 | <div *ngIf="error" class="alert alert-danger">{{ error }}</div> | |
4 | ||
5 | <form novalidate [formGroup]="form"> | |
6 | <div class="form-group"> | |
7 | <label for="name">Name</label> | |
8 | <input | |
9 | type="text" class="form-control" id="name" | |
10 | formControlName="name" | |
11 | > | |
12 | <div *ngIf="formErrors.name" class="alert alert-danger"> | |
13 | {{ formErrors.name }} | |
14 | </div> | |
15 | </div> | |
16 | ||
17 | <div class="form-group"> | |
18 | <label for="nsfw">NSFW</label> | |
19 | <input | |
20 | type="checkbox" id="nsfw" | |
21 | formControlName="nsfw" | |
22 | > | |
23 | </div> | |
24 | ||
25 | <div class="form-group"> | |
26 | <label for="category">Category</label> | |
27 | <select class="form-control" id="category" formControlName="category"> | |
28 | <option></option> | |
29 | <option *ngFor="let category of videoCategories" [value]="category.id">{{ category.label }}</option> | |
30 | </select> | |
31 | ||
32 | <div *ngIf="formErrors.category" class="alert alert-danger"> | |
33 | {{ formErrors.category }} | |
34 | </div> | |
35 | </div> | |
36 | ||
37 | <div class="form-group"> | |
38 | <label for="licence">Licence</label> | |
39 | <select class="form-control" id="licence" formControlName="licence"> | |
40 | <option></option> | |
41 | <option *ngFor="let licence of videoLicences" [value]="licence.id">{{ licence.label }}</option> | |
42 | </select> | |
43 | ||
44 | <div *ngIf="formErrors.licence" class="alert alert-danger"> | |
45 | {{ formErrors.licence }} | |
46 | </div> | |
47 | </div> | |
48 | ||
49 | <div class="form-group"> | |
50 | <label for="language">Language</label> | |
51 | <select class="form-control" id="language" formControlName="language"> | |
52 | <option></option> | |
53 | <option *ngFor="let language of videoLanguages" [value]="language.id">{{ language.label }}</option> | |
54 | </select> | |
55 | ||
56 | <div *ngIf="formErrors.language" class="alert alert-danger"> | |
57 | {{ formErrors.language }} | |
58 | </div> | |
59 | </div> | |
60 | ||
61 | <div class="form-group"> | |
62 | <label for="tags" class="label-tags">Tags</label> <span class="little-information">(press enter to add the tag)</span> | |
63 | <tag-input | |
64 | [ngModel]="tags" [validators]="tagValidators" [errorMessages]="tagValidatorsMessages" | |
65 | formControlName="tags" maxItems="3" modelAsStrings="true" | |
66 | ></tag-input> | |
67 | </div> | |
68 | ||
69 | <div class="form-group"> | |
70 | <label for="description">Description</label> | |
71 | <textarea | |
72 | id="description" class="form-control" placeholder="Description..." | |
73 | formControlName="description" | |
74 | > | |
75 | </textarea> | |
76 | <div *ngIf="formErrors.description" class="alert alert-danger"> | |
77 | {{ formErrors.description }} | |
78 | </div> | |
79 | </div> | |
80 | ||
81 | <div class="form-group"> | |
82 | <input | |
83 | type="button" value="Update" class="btn btn-default form-control" | |
84 | (click)="update()" | |
85 | > | |
86 | </div> | |
87 | </form> |