diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-21 14:45:57 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-21 15:39:51 +0200 |
commit | 781ba981263ee6524fea1a95836108d252a124f4 (patch) | |
tree | d2185d8d5de30d037cac8267cdb7067e6b20d895 /client/src/app | |
parent | 365783532ea7942b96f5e83f4a4dc8f433a07603 (diff) | |
download | PeerTube-781ba981263ee6524fea1a95836108d252a124f4.tar.gz PeerTube-781ba981263ee6524fea1a95836108d252a124f4.tar.zst PeerTube-781ba981263ee6524fea1a95836108d252a124f4.zip |
Add ability to set a description to dynamic fields
Diffstat (limited to 'client/src/app')
3 files changed, 9 insertions, 1 deletions
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts index 0a61227a8..1b2820810 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts | |||
@@ -548,7 +548,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
548 | this.zone.run(() => this.theaterEnabled = enabled) | 548 | this.zone.run(() => this.theaterEnabled = enabled) |
549 | }) | 549 | }) |
550 | 550 | ||
551 | this.hooks.runAction('action:video-watch.player.loaded', 'video-watch', { player: this.player, videojs }) | 551 | this.hooks.runAction('action:video-watch.player.loaded', 'video-watch', { player: this.player, videojs, video: this.video }) |
552 | }) | 552 | }) |
553 | 553 | ||
554 | this.setVideoDescriptionHTML() | 554 | this.setVideoDescriptionHTML() |
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 c111ea7df..17b4a134f 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,6 +1,8 @@ | |||
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.type !== 'input-checkbox'" [attr.for]="setting.name" [innerHTML]="setting.label"></label> |
3 | 3 | ||
4 | <div *ngIf="setting.descriptionHTML" class="label-small-info" [innerHTML]="setting.descriptionHTML"></div> | ||
5 | |||
4 | <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" /> |
5 | 7 | ||
6 | <textarea *ngIf="setting.type === 'input-textarea'" type="text" [id]="setting.name" [formControlName]="setting.name"></textarea> | 8 | <textarea *ngIf="setting.type === 'input-textarea'" type="text" [id]="setting.name" [formControlName]="setting.name"></textarea> |
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 70b3cf6c3..89193ed85 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 | |||
@@ -16,3 +16,9 @@ textarea { | |||
16 | .peertube-select-container { | 16 | .peertube-select-container { |
17 | @include peertube-select-container(340px); | 17 | @include peertube-select-container(340px); |
18 | } | 18 | } |
19 | |||
20 | .label-small-info { | ||
21 | font-style: italic; | ||
22 | margin-bottom: 10px; | ||
23 | font-size: 13px; | ||
24 | } | ||