Skip to content
Snippets Groups Projects
Commit 43725186 authored by OZGCloud's avatar OZGCloud
Browse files

Merge branch 'master' into OZG-5294-abschliessen-button-for-ea-user

parents 20d84131 21ecba9a
No related branches found
No related tags found
No related merge requests found
Showing
with 55 additions and 20 deletions
......@@ -24,7 +24,11 @@
-->
<form class="form" [formGroup]="formService.form">
<ozgcloud-textarea-editor [formControlName]="formServiceClass.TEXT" label="Kommentar">
<ozgcloud-textarea-editor
[formControlName]="formServiceClass.TEXT"
label="Kommentar"
[required]="true"
>
</ozgcloud-textarea-editor>
<alfa-binary-file-attachment-container
......
......@@ -33,12 +33,15 @@
[formControlName]="formServiceClass.FIELD_SUBJECT"
label="Betreff"
[autoFocus]="true"
[required]="true"
>
</ozgcloud-text-editor>
<ozgcloud-textarea-editor
[formControlName]="formServiceClass.FIELD_MAIL_BODY"
label="Text"
class="message-editor"
class="message-editor mt-3"
[autoFocus]="true"
[required]="true"
>
</ozgcloud-textarea-editor>
......
......@@ -38,15 +38,8 @@
}
.message-editor {
margin-top: -30px;
margin-top: -20px;
display: block;
::ng-deep {
label,
.mat-lable {
visibility: hidden;
}
}
}
.receiver {
......
......@@ -24,12 +24,19 @@
-->
<mat-form-field>
<mat-label>{{ label }}</mat-label>
<mat-label
>{{ label
}}<ng-container *ngIf="required">
<i aria-hidden="true">*</i>
<i class="sr-only">(erforderlich)</i>
</ng-container>
</mat-label>
<input
matInput
[matDatepicker]="picker"
[formControl]="fieldControl"
(blur)="touch()"
[attr.aria-required]="required"
[attr.data-test-id]="(label | convertForDataTest) + '-date-input'"
(dateInput)="inputEvent($event)"
(blur)="onBlur()"
......
......@@ -34,6 +34,7 @@ import { FormControlEditorAbstractComponent } from '../formcontrol-editor.abstra
})
export class DateEditorComponent extends FormControlEditorAbstractComponent {
@Input() label: string;
@Input() required: boolean = false;
inputEvent(event: MatDatepickerInputEvent<Date>): void {
this.onChange(event.value);
......
......@@ -29,7 +29,13 @@
appearance="{{ appearance }}"
[floatLabel]="readOnly || autoFocus ? 'always' : 'auto'"
>
<mat-label>{{ label }}</mat-label>
<mat-label
>{{ label
}}<ng-container *ngIf="required">
<i aria-hidden="true">*</i>
<i class="sr-only">(erforderlich)</i>
</ng-container>
</mat-label>
<div class="wrapper">
<input
#inputElement
......@@ -39,6 +45,7 @@
[autocomplete]="autocomplete"
[readonly]="readOnly"
(blur)="touch()"
[attr.aria-required]="required"
[attr.data-test-id]="(label | convertForDataTest) + '-text-input'"
[class.with-clear-button]="showClearButton$ | async"
/>
......
......@@ -21,11 +21,11 @@
* Die sprachspezifischen Genehmigungen und Beschränkungen
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import { AfterViewInit, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
import { FormControlEditorAbstractComponent } from '../formcontrol-editor.abstract.component';
import { map, Observable, startWith } from 'rxjs';
import { hasContent } from '@alfa-client/tech-shared';
import { AfterViewInit, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
import { SubscriptSizing } from '@angular/material/form-field';
import { Observable, map, startWith } from 'rxjs';
import { FormControlEditorAbstractComponent } from '../formcontrol-editor.abstract.component';
@Component({
selector: 'ozgcloud-text-editor',
......@@ -45,7 +45,8 @@ export class TextEditorComponent
@Input() appearance: 'outline' | 'fill' = 'fill';
@Input() readOnly: boolean;
@Input() autoFocus: boolean;
@Input() clearable = false;
@Input() clearable: boolean = false;
@Input() required: boolean = false;
@Input() subscriptSizing: SubscriptSizing = 'fixed';
showClearButton$: Observable<boolean>;
......
......@@ -23,8 +23,14 @@
unter der Lizenz sind dem Lizenztext zu entnehmen.
-->
<mat-form-field [appearance]="appearance">
<mat-label>{{ label }}</mat-label>
<mat-form-field [appearance]="appearance" [floatLabel]="autoFocus ? 'always' : 'auto'">
<mat-label
>{{ label
}}<ng-container *ngIf="required">
<i aria-hidden="true">*</i>
<i class="sr-only">(erforderlich)</i>
</ng-container>
</mat-label>
<textarea
#autosize="cdkTextareaAutosize"
......@@ -32,6 +38,7 @@
matInput
cdkTextareaAutosize
[formControl]="fieldControl"
[attr.aria-required]="required"
[attr.data-test-id]="(label | convertForDataTest) + '-textarea-input'"
(blur)="touch()"
></textarea>
......
......@@ -39,6 +39,8 @@ export class TextAreaEditorComponent
@Input() placeholder: string;
@Input() label: string = '';
@Input() appearance: 'outline' | 'fill' = 'fill';
@Input() required: boolean = false;
@Input() autoFocus: boolean = false;
ngAfterViewInit() {
this.autosize.resizeToFitContent(true);
......
......@@ -22,6 +22,7 @@
[formControlName]="formServiceClass.FIELD_BESCHIEDEN_AM"
label="am"
aria-label="Bescheiddatum"
[required]="true"
>
</ozgcloud-date-editor>
</div>
......
......@@ -24,7 +24,11 @@
-->
<form class="form" [formGroup]="formService.form">
<ozgcloud-text-editor label="Betreff" [formControlName]="formServiceClass.FIELD_BETREFF">
<ozgcloud-text-editor
label="Betreff"
[formControlName]="formServiceClass.FIELD_BETREFF"
[required]="true"
>
</ozgcloud-text-editor>
<ozgcloud-textarea-editor
......@@ -33,7 +37,12 @@
>
</ozgcloud-textarea-editor>
<ozgcloud-date-editor class="date" label="Frist" [formControlName]="formServiceClass.FIELD_FRIST">
<ozgcloud-date-editor
class="date"
label="Frist"
[formControlName]="formServiceClass.FIELD_FRIST"
[required]="true"
>
</ozgcloud-date-editor>
<alfa-binary-file-attachment-container
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment