aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-09 11:19:14 +0200
committerChocobozzz <me@florianbigard.com>2021-04-09 11:19:14 +0200
commit32d13b203b3abf756e751994836c28ddd1f4ebd9 (patch)
tree4fdaf486ecf57d39d0fa6cf45aebe1167d7a9438 /client/src
parent55b84d5346f6db35454a1bd102997769021d6470 (diff)
downloadPeerTube-32d13b203b3abf756e751994836c28ddd1f4ebd9.tar.gz
PeerTube-32d13b203b3abf756e751994836c28ddd1f4ebd9.tar.zst
PeerTube-32d13b203b3abf756e751994836c28ddd1f4ebd9.zip
Plugins can register html/select settings
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/shared/shared-forms/dynamic-form-field.component.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/src/app/shared/shared-forms/dynamic-form-field.component.html b/client/src/app/shared/shared-forms/dynamic-form-field.component.html
index c358cb119..8e9ef5355 100644
--- a/client/src/app/shared/shared-forms/dynamic-form-field.component.html
+++ b/client/src/app/shared/shared-forms/dynamic-form-field.component.html
@@ -1,10 +1,16 @@
1<div [formGroup]="form"> 1<div [formGroup]="form">
2 <label *ngIf="setting.type !== 'input-checkbox'" [attr.for]="setting.name" [innerHTML]="setting.label"></label> 2 <label *ngIf="setting.label" [attr.for]="setting.name" [innerHTML]="setting.label"></label>
3 3
4 <div *ngIf="setting.descriptionHTML" class="label-small-info" [innerHTML]="setting.descriptionHTML"></div> 4 <div *ngIf="setting.descriptionHTML" class="label-small-info" [innerHTML]="setting.descriptionHTML"></div>
5 5
6 <input *ngIf="setting.type === 'input'" type="text" [id]="setting.name" [formControlName]="setting.name" /> 6 <input *ngIf="setting.type === 'input'" type="text" [id]="setting.name" [formControlName]="setting.name" />
7 7
8 <div *ngIf="setting.type === 'select'" class="peertube-select-container">
9 <select [id]="setting.name" [formControlName]="setting.name" class="form-control">
10 <option *ngFor="let option of setting.options" [value]="option.value">{{ option.label }}</option>
11 </select>
12 </div>
13
8 <my-input-toggle-hidden *ngIf="setting.type === 'input-password'" [formControlName]="setting.name" [inputId]="setting.name"></my-input-toggle-hidden> 14 <my-input-toggle-hidden *ngIf="setting.type === 'input-password'" [formControlName]="setting.name" [inputId]="setting.name"></my-input-toggle-hidden>
9 15
10 <textarea *ngIf="setting.type === 'input-textarea'" type="text" [id]="setting.name" [formControlName]="setting.name"></textarea> 16 <textarea *ngIf="setting.type === 'input-textarea'" type="text" [id]="setting.name" [formControlName]="setting.name"></textarea>
@@ -32,6 +38,8 @@
32 [labelInnerHTML]="setting.label" 38 [labelInnerHTML]="setting.label"
33 ></my-peertube-checkbox> 39 ></my-peertube-checkbox>
34 40
41 <div *ngIf="setting.type === 'html'" [innerHTML]="setting.html"></div>
42
35 <div *ngIf="formErrors[setting.name]" class="form-error"> 43 <div *ngIf="formErrors[setting.name]" class="form-error">
36 {{ formErrors[setting.name] }} 44 {{ formErrors[setting.name] }}
37 </div> 45 </div>