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

Merge pull request 'OZG-6727 Fix snackbar message text' (#764) from OZG-6727-bugfix into master

parents a2c9dcbe 63587544
No related branches found
No related tags found
No related merge requests found
Showing with 11 additions and 5 deletions
<form [formGroup]="formService.form">
<form [formGroup]="formService.form" class="max-w-[960px]">
<h2 class="heading-2">Signatur</h2>
<p id="signatur-desc">
Diese Signatur wird bei allen Nachrichten an den Antragsteller angezeigt.
......@@ -6,8 +6,9 @@
<ods-textarea-editor
[formControlName]="formServiceClass.SIGNATUR_FIELD"
[isResizable]="false"
[showLabel]="false"
data-test-id="signatur-text"
label=""
label="signature"
rows="6"
class="w-full"
aria-describedby="signatur-desc"
......
......@@ -91,7 +91,7 @@ describe('PostfachService', () => {
tick();
expect(snackbarService.showInfo).toHaveBeenCalledWith(
'Die Signatur wird erfolgreich gespeichert.',
'Die Signatur wurde erfolgreich gespeichert.',
);
}));
});
......
......@@ -28,7 +28,7 @@ export class PostfachService {
private showInfoAfterSave(stateResource: StateResource<PostfachResource>) {
if (!stateResource.loading) {
this.snackbarService.showInfo('Die Signatur wird erfolgreich gespeichert.');
this.snackbarService.showInfo('Die Signatur wurde erfolgreich gespeichert.');
}
}
......
......@@ -7,6 +7,7 @@
[attr.data-test-id]="(label | convertForDataTest) + '-text-editor'"
[required]="isRequired"
[focus]="focus"
[showLabel]="showLabel"
>
<ods-validation-error
error
......
......@@ -24,6 +24,7 @@ export class TextEditorComponent extends FormControlEditorAbstractComponent {
@Input() placeholder: string = '';
@Input() isRequired: boolean = false;
@Input() focus: boolean = false;
@Input() showLabel: boolean = true;
get variant(): string {
return this.invalidParams.length > 0 ? 'error' : 'default';
......
......@@ -8,6 +8,7 @@
[required]="isRequired"
[focus]="focus"
[isResizable]="isResizable"
[showLabel]="showLabel"
>
<ods-validation-error
error
......
......@@ -25,6 +25,7 @@ export class TextareaEditorComponent extends FormControlEditorAbstractComponent
@Input() isRequired: boolean = false;
@Input() focus: boolean = false;
@Input() isResizable: boolean = true;
@Input() showLabel: boolean = true;
get variant(): string {
return this.invalidParams.length > 0 ? 'error' : 'default';
......
......@@ -31,7 +31,7 @@ type TextareaVariants = VariantProps<typeof textareaVariants>;
imports: [CommonModule, ReactiveFormsModule, TechSharedModule],
template: `
<div class="mt-2">
<label [for]="id" class="text-md mb-2 block font-medium text-text">
<label *ngIf="showLabel" [for]="id" class="text-md mb-2 block font-medium text-text">
{{ inputLabel }}<ng-container *ngIf="required"><i aria-hidden="true">*</i></ng-container>
</label>
<textarea
......@@ -65,6 +65,7 @@ export class TextareaComponent {
@Input() fieldControl: FormControl = new FormControl(EMPTY_STRING);
@Input() required: boolean = false;
@Input() isResizable: boolean = true;
@Input() showLabel: boolean = true;
@Input() set focus(value: boolean) {
if (value && this.textAreaElement) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment