aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-07-19 11:03:40 +0200
committerChocobozzz <me@florianbigard.com>2023-07-19 11:22:05 +0200
commitd430862f00f04e0831bcb4b3e188aad0fd8c45d1 (patch)
treeeddb14fe0c1a12b04824df3f4e837270813f40fa
parent15c2303489915398d4564dc29a14b79aae781593 (diff)
downloadPeerTube-d430862f00f04e0831bcb4b3e188aad0fd8c45d1.tar.gz
PeerTube-d430862f00f04e0831bcb4b3e188aad0fd8c45d1.tar.zst
PeerTube-d430862f00f04e0831bcb4b3e188aad0fd8c45d1.zip
Force ltr on code inputs
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.html4
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html1
-rw-r--r--client/src/app/shared/shared-forms/markdown-textarea.component.html2
-rw-r--r--client/src/app/shared/shared-forms/markdown-textarea.component.ts2
4 files changed, 6 insertions, 3 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.html b/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.html
index 9701e7f85..20cbcec02 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.html
@@ -94,7 +94,7 @@
94 </my-help> 94 </my-help>
95 95
96 <textarea 96 <textarea
97 id="customizationJavascript" formControlName="javascript" class="form-control" 97 id="customizationJavascript" formControlName="javascript" class="form-control" dir="ltr"
98 [ngClass]="{ 'input-error': formErrors['instance.customizations.javascript'] }" 98 [ngClass]="{ 'input-error': formErrors['instance.customizations.javascript'] }"
99 ></textarea> 99 ></textarea>
100 100
@@ -124,7 +124,7 @@ color: red;
124 </my-help> 124 </my-help>
125 125
126 <textarea 126 <textarea
127 id="customizationCSS" formControlName="css" class="form-control" 127 id="customizationCSS" formControlName="css" class="form-control" dir="ltr"
128 [ngClass]="{ 'input-error': formErrors['instance.customizations.css'] }" 128 [ngClass]="{ 'input-error': formErrors['instance.customizations.css'] }"
129 ></textarea> 129 ></textarea>
130 <div *ngIf="formErrors.instance.customizations.css" class="form-error">{{ formErrors.instance.customizations.css }}</div> 130 <div *ngIf="formErrors.instance.customizations.css" class="form-error">{{ formErrors.instance.customizations.css }}</div>
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html b/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html
index fd009367f..91f3afd10 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html
@@ -19,6 +19,7 @@
19 name="instanceCustomHomepageContent" formControlName="content" 19 name="instanceCustomHomepageContent" formControlName="content"
20 [customMarkdownRenderer]="getCustomMarkdownRenderer()" [debounceTime]="500" 20 [customMarkdownRenderer]="getCustomMarkdownRenderer()" [debounceTime]="500"
21 [formError]="formErrors['instanceCustomHomepage.content']" 21 [formError]="formErrors['instanceCustomHomepage.content']"
22 dir="ltr"
22 ></my-markdown-textarea> 23 ></my-markdown-textarea>
23 24
24 <div *ngIf="formErrors.instanceCustomHomepage.content" class="form-error">{{ formErrors.instanceCustomHomepage.content }}</div> 25 <div *ngIf="formErrors.instanceCustomHomepage.content" class="form-error">{{ formErrors.instanceCustomHomepage.content }}</div>
diff --git a/client/src/app/shared/shared-forms/markdown-textarea.component.html b/client/src/app/shared/shared-forms/markdown-textarea.component.html
index 5d355a6d8..63dcdc597 100644
--- a/client/src/app/shared/shared-forms/markdown-textarea.component.html
+++ b/client/src/app/shared/shared-forms/markdown-textarea.component.html
@@ -4,7 +4,7 @@
4 [(ngModel)]="content" (ngModelChange)="onModelChange()" 4 [(ngModel)]="content" (ngModelChange)="onModelChange()"
5 class="form-control" [ngClass]="{ 'input-error': formError }" 5 class="form-control" [ngClass]="{ 'input-error': formError }"
6 [attr.disabled]="disabled || null" 6 [attr.disabled]="disabled || null"
7 [id]="name" [name]="name"> 7 [id]="name" [name]="name" [dir]="dir">
8 </textarea> 8 </textarea>
9 9
10 <div ngbNav #nav="ngbNav" class="nav-pills nav-preview"> 10 <div ngbNav #nav="ngbNav" class="nav-pills nav-preview">
diff --git a/client/src/app/shared/shared-forms/markdown-textarea.component.ts b/client/src/app/shared/shared-forms/markdown-textarea.component.ts
index 7e2d3e4f4..036fab3d9 100644
--- a/client/src/app/shared/shared-forms/markdown-textarea.component.ts
+++ b/client/src/app/shared/shared-forms/markdown-textarea.component.ts
@@ -37,6 +37,8 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
37 37
38 @Input() name = 'description' 38 @Input() name = 'description'
39 39
40 @Input() dir: string
41
40 @ViewChild('textarea') textareaElement: ElementRef 42 @ViewChild('textarea') textareaElement: ElementRef
41 @ViewChild('previewElement') previewElement: ElementRef 43 @ViewChild('previewElement') previewElement: ElementRef
42 44