From c3a0413c929724074004ecbfcd0ed0e866cd733a Mon Sep 17 00:00:00 2001
From: rhenck <richard.henck@iqb.hu-berlin.de>
Date: Thu, 28 Oct 2021 15:50:13 +0200
Subject: [PATCH] Improve label of text field element and use better dummy
 value

---
 projects/common/element-components/text-field.component.ts | 4 ++--
 projects/common/models/uI-element.ts                       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/projects/common/element-components/text-field.component.ts b/projects/common/element-components/text-field.component.ts
index 22b72ae63..1bef0a063 100644
--- a/projects/common/element-components/text-field.component.ts
+++ b/projects/common/element-components/text-field.component.ts
@@ -16,12 +16,12 @@ import { TextFieldElement } from '../models/text-field-element';
                     [style.text-decoration]="elementModel.underline ? 'underline' : ''"
                     appInputBackgroundColor [backgroundColor]="elementModel.backgroundColor"
                     [appearance]="$any(elementModel.appearance)">
+      <mat-label>{{elementModel.label}}</mat-label>
       <input matInput type="text" [pattern]="elementModel.pattern" #input
              (focus)="onFocus.emit(input)"
              (blur)="onBlur.emit(input)"
              autocomplete="off"
-             [formControl]="elementFormControl"
-             placeholder="{{elementModel.label}}">
+             [formControl]="elementFormControl">
       <button *ngIf="elementModel.clearable" matSuffix mat-icon-button aria-label="Clear"
               (click)="onClick($event)">
         <mat-icon>close</mat-icon>
diff --git a/projects/common/models/uI-element.ts b/projects/common/models/uI-element.ts
index 89747ecd1..fa91dcf4e 100644
--- a/projects/common/models/uI-element.ts
+++ b/projects/common/models/uI-element.ts
@@ -53,7 +53,7 @@ export abstract class InputElement extends UIElement {
 
   protected constructor(serializedElement: UIElement, coordinates?: { x: number; y: number }) {
     super(serializedElement, coordinates);
-    this.label = serializedElement.label as string || 'Dummylabel';
+    this.label = serializedElement.label as string || 'Beispielbeschriftung';
     this.value = serializedElement.value as string | number | boolean | null || null;
     this.required = serializedElement.required as boolean || false;
     this.requiredWarnMessage = serializedElement.requiredWarnMessage as string || 'Eingabe erforderlich';
-- 
GitLab