aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-forms
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-10 15:58:38 +0200
committerChocobozzz <me@florianbigard.com>2022-06-10 15:58:38 +0200
commita70bf3bd3337406704af5907a015ba385df0483d (patch)
tree5c64314edae6dc68339116b26b7d0480cdb65e4e /client/src/app/shared/shared-forms
parentb15fcd49bff880a8246cb48292af3ae8d66f0699 (diff)
downloadPeerTube-a70bf3bd3337406704af5907a015ba385df0483d.tar.gz
PeerTube-a70bf3bd3337406704af5907a015ba385df0483d.tar.zst
PeerTube-a70bf3bd3337406704af5907a015ba385df0483d.zip
Rename input toggle hidden to input text
It's more than just an hidden toggle
Diffstat (limited to 'client/src/app/shared/shared-forms')
-rw-r--r--client/src/app/shared/shared-forms/dynamic-form-field.component.html2
-rw-r--r--client/src/app/shared/shared-forms/index.ts2
-rw-r--r--client/src/app/shared/shared-forms/input-text.component.html (renamed from client/src/app/shared/shared-forms/input-toggle-hidden.component.html)0
-rw-r--r--client/src/app/shared/shared-forms/input-text.component.scss (renamed from client/src/app/shared/shared-forms/input-toggle-hidden.component.scss)0
-rw-r--r--client/src/app/shared/shared-forms/input-text.component.ts (renamed from client/src/app/shared/shared-forms/input-toggle-hidden.component.ts)10
-rw-r--r--client/src/app/shared/shared-forms/shared-form.module.ts6
6 files changed, 10 insertions, 10 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 2ef61ecfc..2ec436ac6 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
@@ -18,7 +18,7 @@
18 </select> 18 </select>
19 </div> 19 </div>
20 20
21 <my-input-toggle-hidden *ngIf="setting.type === 'input-password'" [formControlName]="setting.name" [inputId]="setting.name"></my-input-toggle-hidden> 21 <my-input-text *ngIf="setting.type === 'input-password'" [formControlName]="setting.name" [inputId]="setting.name"></my-input-text>
22 22
23 <textarea *ngIf="setting.type === 'input-textarea'" type="text" [id]="setting.name" [formControlName]="setting.name"></textarea> 23 <textarea *ngIf="setting.type === 'input-textarea'" type="text" [id]="setting.name" [formControlName]="setting.name"></textarea>
24 24
diff --git a/client/src/app/shared/shared-forms/index.ts b/client/src/app/shared/shared-forms/index.ts
index 727416a40..495785e7b 100644
--- a/client/src/app/shared/shared-forms/index.ts
+++ b/client/src/app/shared/shared-forms/index.ts
@@ -3,7 +3,7 @@ export * from './form-reactive'
3export * from './form-validator.service' 3export * from './form-validator.service'
4export * from './form-validator.service' 4export * from './form-validator.service'
5export * from './input-switch.component' 5export * from './input-switch.component'
6export * from './input-toggle-hidden.component' 6export * from './input-text.component'
7export * from './markdown-textarea.component' 7export * from './markdown-textarea.component'
8export * from './peertube-checkbox.component' 8export * from './peertube-checkbox.component'
9export * from './preview-upload.component' 9export * from './preview-upload.component'
diff --git a/client/src/app/shared/shared-forms/input-toggle-hidden.component.html b/client/src/app/shared/shared-forms/input-text.component.html
index f7f9ce403..f7f9ce403 100644
--- a/client/src/app/shared/shared-forms/input-toggle-hidden.component.html
+++ b/client/src/app/shared/shared-forms/input-text.component.html
diff --git a/client/src/app/shared/shared-forms/input-toggle-hidden.component.scss b/client/src/app/shared/shared-forms/input-text.component.scss
index cc1646a69..cc1646a69 100644
--- a/client/src/app/shared/shared-forms/input-toggle-hidden.component.scss
+++ b/client/src/app/shared/shared-forms/input-text.component.scss
diff --git a/client/src/app/shared/shared-forms/input-toggle-hidden.component.ts b/client/src/app/shared/shared-forms/input-text.component.ts
index e03353fe1..ed4637c17 100644
--- a/client/src/app/shared/shared-forms/input-toggle-hidden.component.ts
+++ b/client/src/app/shared/shared-forms/input-text.component.ts
@@ -3,18 +3,18 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
3import { Notifier } from '@app/core' 3import { Notifier } from '@app/core'
4 4
5@Component({ 5@Component({
6 selector: 'my-input-toggle-hidden', 6 selector: 'my-input-text',
7 templateUrl: './input-toggle-hidden.component.html', 7 templateUrl: './input-text.component.html',
8 styleUrls: [ './input-toggle-hidden.component.scss' ], 8 styleUrls: [ './input-text.component.scss' ],
9 providers: [ 9 providers: [
10 { 10 {
11 provide: NG_VALUE_ACCESSOR, 11 provide: NG_VALUE_ACCESSOR,
12 useExisting: forwardRef(() => InputToggleHiddenComponent), 12 useExisting: forwardRef(() => InputTextComponent),
13 multi: true 13 multi: true
14 } 14 }
15 ] 15 ]
16}) 16})
17export class InputToggleHiddenComponent implements ControlValueAccessor { 17export class InputTextComponent implements ControlValueAccessor {
18 @Input() inputId = Math.random().toString(11).slice(2, 8) // id cannot be left empty or undefined 18 @Input() inputId = Math.random().toString(11).slice(2, 8) // id cannot be left empty or undefined
19 @Input() value = '' 19 @Input() value = ''
20 @Input() autocomplete = 'off' 20 @Input() autocomplete = 'off'
diff --git a/client/src/app/shared/shared-forms/shared-form.module.ts b/client/src/app/shared/shared-forms/shared-form.module.ts
index 60c2f66ae..81f076db6 100644
--- a/client/src/app/shared/shared-forms/shared-form.module.ts
+++ b/client/src/app/shared/shared-forms/shared-form.module.ts
@@ -9,7 +9,7 @@ import { AdvancedInputFilterComponent } from './advanced-input-filter.component'
9import { DynamicFormFieldComponent } from './dynamic-form-field.component' 9import { DynamicFormFieldComponent } from './dynamic-form-field.component'
10import { FormValidatorService } from './form-validator.service' 10import { FormValidatorService } from './form-validator.service'
11import { InputSwitchComponent } from './input-switch.component' 11import { InputSwitchComponent } from './input-switch.component'
12import { InputToggleHiddenComponent } from './input-toggle-hidden.component' 12import { InputTextComponent } from './input-text.component'
13import { MarkdownTextareaComponent } from './markdown-textarea.component' 13import { MarkdownTextareaComponent } from './markdown-textarea.component'
14import { PeertubeCheckboxComponent } from './peertube-checkbox.component' 14import { PeertubeCheckboxComponent } from './peertube-checkbox.component'
15import { PreviewUploadComponent } from './preview-upload.component' 15import { PreviewUploadComponent } from './preview-upload.component'
@@ -40,7 +40,7 @@ import { TimestampInputComponent } from './timestamp-input.component'
40 ], 40 ],
41 41
42 declarations: [ 42 declarations: [
43 InputToggleHiddenComponent, 43 InputTextComponent,
44 MarkdownTextareaComponent, 44 MarkdownTextareaComponent,
45 PeertubeCheckboxComponent, 45 PeertubeCheckboxComponent,
46 PreviewUploadComponent, 46 PreviewUploadComponent,
@@ -71,7 +71,7 @@ import { TimestampInputComponent } from './timestamp-input.component'
71 InputMaskModule, 71 InputMaskModule,
72 NgSelectModule, 72 NgSelectModule,
73 73
74 InputToggleHiddenComponent, 74 InputTextComponent,
75 MarkdownTextareaComponent, 75 MarkdownTextareaComponent,
76 PeertubeCheckboxComponent, 76 PeertubeCheckboxComponent,
77 PreviewUploadComponent, 77 PreviewUploadComponent,