diff options
author | madmath03 <mb.mathieu.brunot@gmail.com> | 2020-11-27 19:51:25 +0000 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-30 14:49:44 +0100 |
commit | 972de8f111fcacf523cf33062dd734e498df1081 (patch) | |
tree | 3b616a77401bd9897d40cbc8cc128242457359ec | |
parent | ee663cce0027167c29279863abde477c9c0a2826 (diff) | |
download | PeerTube-972de8f111fcacf523cf33062dd734e498df1081.tar.gz PeerTube-972de8f111fcacf523cf33062dd734e498df1081.tar.zst PeerTube-972de8f111fcacf523cf33062dd734e498df1081.zip |
:sparkles: Add input-password #3375
-rw-r--r-- | client/src/app/shared/shared-forms/dynamic-form-field.component.html | 2 | ||||
-rw-r--r-- | shared/models/plugins/register-client-form-field.model.ts | 2 | ||||
-rw-r--r-- | support/doc/plugins/guide.md | 2 |
3 files changed, 4 insertions, 2 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 17b4a134f..6a3c31637 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 | |||
@@ -5,6 +5,8 @@ | |||
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 | <input *ngIf="setting.type === 'input-password'" type="password" [id]="setting.name" [formControlName]="setting.name" /> | ||
9 | |||
8 | <textarea *ngIf="setting.type === 'input-textarea'" type="text" [id]="setting.name" [formControlName]="setting.name"></textarea> | 10 | <textarea *ngIf="setting.type === 'input-textarea'" type="text" [id]="setting.name" [formControlName]="setting.name"></textarea> |
9 | 11 | ||
10 | <my-help *ngIf="setting.type === 'markdown-text'" helpType="markdownText"></my-help> | 12 | <my-help *ngIf="setting.type === 'markdown-text'" helpType="markdownText"></my-help> |
diff --git a/shared/models/plugins/register-client-form-field.model.ts b/shared/models/plugins/register-client-form-field.model.ts index ec333e8d6..641d7490c 100644 --- a/shared/models/plugins/register-client-form-field.model.ts +++ b/shared/models/plugins/register-client-form-field.model.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | export interface RegisterClientFormFieldOptions { | 1 | export interface RegisterClientFormFieldOptions { |
2 | name: string | 2 | name: string |
3 | label: string | 3 | label: string |
4 | type: 'input' | 'input-checkbox' | 'input-textarea' | 'markdown-text' | 'markdown-enhanced' | 4 | type: 'input' | 'input-checkbox' | 'input-password' | 'input-textarea' | 'markdown-text' | 'markdown-enhanced' |
5 | 5 | ||
6 | descriptionHTML?: string | 6 | descriptionHTML?: string |
7 | 7 | ||
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md index 101d3e094..a276143e6 100644 --- a/support/doc/plugins/guide.md +++ b/support/doc/plugins/guide.md | |||
@@ -165,7 +165,7 @@ registerSetting({ | |||
165 | name: 'admin-name', | 165 | name: 'admin-name', |
166 | label: 'Admin name', | 166 | label: 'Admin name', |
167 | type: 'input', | 167 | type: 'input', |
168 | // type: input | input-checkbox | input-textarea | markdown-text | markdown-enhanced | 168 | // type: input | input-checkbox | input-password | input-textarea | markdown-text | markdown-enhanced |
169 | default: 'my super name' | 169 | default: 'my super name' |
170 | }) | 170 | }) |
171 | 171 | ||