Use missing textarea field for config inputtype 'text'.
This commit is contained in:
parent
793066935e
commit
f3b96d4386
@ -56,6 +56,14 @@
|
||||
<div class="error" *ngIf="error">{{ error }}</div>
|
||||
</div>
|
||||
|
||||
<!-- textarea -->
|
||||
<div *ngIf="configItem.inputType === 'text'">
|
||||
<mat-form-field>
|
||||
<textarea rows="10" matInput placeholder="{{ configItem.label | translate }}" [value]="translatedValue"></textarea>
|
||||
<div class="hint" *ngIf="configItem.helpText && !error">{{ configItem.helpText | translate }}</div>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<!-- The editor -->
|
||||
<div *ngIf="configItem.inputType === 'markupText'">
|
||||
<h4>{{ configItem.label | translate }}</h4>
|
||||
|
@ -102,7 +102,11 @@ export class ConfigFieldComponent extends BaseComponent implements OnInit {
|
||||
});
|
||||
|
||||
this.translatedValue = this.configItem.value;
|
||||
if (this.configItem.inputType === 'string' || this.configItem.inputType === 'markupText') {
|
||||
if (
|
||||
this.configItem.inputType === 'string' ||
|
||||
this.configItem.inputType === 'markupText' ||
|
||||
this.configItem.inputType === 'text'
|
||||
) {
|
||||
if (typeof this.configItem.value === 'string' && this.configItem.value !== '') {
|
||||
this.translatedValue = this.translate.instant(this.configItem.value);
|
||||
}
|
||||
@ -207,7 +211,7 @@ export class ConfigFieldComponent extends BaseComponent implements OnInit {
|
||||
* @returns wheather it should be excluded or not
|
||||
*/
|
||||
public isExcludedType(type: string): boolean {
|
||||
const excluded = ['boolean', 'markupText'];
|
||||
const excluded = ['boolean', 'markupText', 'text'];
|
||||
return excluded.includes(type);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user