diff options
-rw-r--r-- | client/src/app/shared/shared-forms/dynamic-form-field.component.html | 16 | ||||
-rw-r--r-- | client/src/app/shared/shared-forms/dynamic-form-field.component.scss | 4 |
2 files changed, 12 insertions, 8 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 8e9ef5355..c228069b5 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,5 +1,12 @@ | |||
1 | <div [formGroup]="form"> | 1 | <div [formGroup]="form"> |
2 | <label *ngIf="setting.label" [attr.for]="setting.name" [innerHTML]="setting.label"></label> | 2 | <label *ngIf="setting.label && setting.type !== 'input-checkbox'" [attr.for]="setting.name" [innerHTML]="setting.label"></label> |
3 | |||
4 | <my-peertube-checkbox | ||
5 | *ngIf="setting.type === 'input-checkbox'" | ||
6 | [inputName]="setting.name" | ||
7 | [formControlName]="setting.name" | ||
8 | [labelInnerHTML]="setting.label" | ||
9 | ></my-peertube-checkbox> | ||
3 | 10 | ||
4 | <div *ngIf="setting.descriptionHTML" class="label-small-info" [innerHTML]="setting.descriptionHTML"></div> | 11 | <div *ngIf="setting.descriptionHTML" class="label-small-info" [innerHTML]="setting.descriptionHTML"></div> |
5 | 12 | ||
@@ -31,13 +38,6 @@ | |||
31 | [classes]="{ 'input-error': formErrors['settings.name'] }" | 38 | [classes]="{ 'input-error': formErrors['settings.name'] }" |
32 | ></my-markdown-textarea> | 39 | ></my-markdown-textarea> |
33 | 40 | ||
34 | <my-peertube-checkbox | ||
35 | *ngIf="setting.type === 'input-checkbox'" | ||
36 | [inputName]="setting.name" | ||
37 | [formControlName]="setting.name" | ||
38 | [labelInnerHTML]="setting.label" | ||
39 | ></my-peertube-checkbox> | ||
40 | |||
41 | <div *ngIf="setting.type === 'html'" [innerHTML]="setting.html"></div> | 41 | <div *ngIf="setting.type === 'html'" [innerHTML]="setting.html"></div> |
42 | 42 | ||
43 | <div *ngIf="formErrors[setting.name]" class="form-error"> | 43 | <div *ngIf="formErrors[setting.name]" class="form-error"> |
diff --git a/client/src/app/shared/shared-forms/dynamic-form-field.component.scss b/client/src/app/shared/shared-forms/dynamic-form-field.component.scss index 89193ed85..45ba28951 100644 --- a/client/src/app/shared/shared-forms/dynamic-form-field.component.scss +++ b/client/src/app/shared/shared-forms/dynamic-form-field.component.scss | |||
@@ -22,3 +22,7 @@ textarea { | |||
22 | margin-bottom: 10px; | 22 | margin-bottom: 10px; |
23 | font-size: 13px; | 23 | font-size: 13px; |
24 | } | 24 | } |
25 | |||
26 | my-peertube-checkbox + .label-small-info { | ||
27 | margin-top: 5px; | ||
28 | } | ||