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