]>
Commit | Line | Data |
---|---|---|
dba85a1e C |
1 | <ng-container *ngIf="plugin"> |
2 | ||
3 | <h2> | |
4 | <ng-container>{{ pluginTypeLabel }}</ng-container> | |
5 | {{ plugin.name }} | |
6 | </h2> | |
7 | ||
8 | <form *ngIf="hasRegisteredSettings()" role="form" (ngSubmit)="formValidated()" [formGroup]="form"> | |
9 | <div class="form-group" *ngFor="let setting of registeredSettings"> | |
2dbbf860 | 10 | <label *ngIf="setting.type !== 'input-checkbox'" [attr.for]="setting.name" [innerHTML]="setting.label"></label> |
dba85a1e | 11 | <input *ngIf="setting.type === 'input'" type="text" [id]="setting.name" [formControlName]="setting.name" /> |
2dbbf860 RK |
12 | <textarea *ngIf="setting.type === 'input-textarea'" type="text" [id]="setting.name" [formControlName]="setting.name"></textarea> |
13 | ||
14 | <my-peertube-checkbox | |
15 | *ngIf="setting.type === 'input-checkbox'" | |
16 | [id]="setting.name" | |
17 | [formControlName]="setting.name" | |
18 | [labelInnerHTML]="setting.label" | |
19 | ></my-peertube-checkbox> | |
dba85a1e C |
20 | |
21 | <div *ngIf="formErrors[setting.name]" class="form-error"> | |
22 | {{ formErrors[setting.name] }} | |
23 | </div> | |
24 | </div> | |
25 | ||
26 | <input type="submit" i18n value="Update plugin settings" [disabled]="!form.valid"> | |
27 | </form> | |
28 | ||
29 | <div *ngIf="!hasRegisteredSettings()" i18n class="no-settings"> | |
30 | This {{ pluginTypeLabel }} does not have settings. | |
31 | </div> | |
32 | ||
33 | </ng-container> |