diff --git a/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.html b/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.html index 1810d165698be792d5230c7180a462d64b3a83e6..4ddfd2b7a927afdb4016395058ed22486429588a 100644 --- a/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.html +++ b/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.html @@ -45,7 +45,6 @@ <button (click)="submit()" - [disabled]="isSubmitting" data-test-id="save-button" class="bg-ozgblue-700 hover:bg-ozgblue-600 active:bg-ozgblue-600/90 focus-visible:outline-ozgblue-800 rounded-md px-3 py-2 text-sm font-semibold text-white shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2" > diff --git a/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.spec.ts b/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.spec.ts index b71dc55347a0bd7ee88ffd09ac83f46a459ac1fa..ee99eb6160254fa35e04559a9f11fa2bece3e8f4 100644 --- a/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.spec.ts +++ b/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.spec.ts @@ -74,7 +74,7 @@ describe('PostfachFormComponent', () => { it('should use form control for signatur-text', () => { const someText = 'some signatur text'; - form.get(PostfachFormService.SIGNATUR_FIELD)!!.setValue(someText); + form.get(PostfachFormService.SIGNATUR_FIELD).setValue(someText); const signatur = getElementFromFixture(fixture, signaturTextarea); expect(signatur.value).toBe(someText); @@ -89,23 +89,5 @@ describe('PostfachFormComponent', () => { expect(component.submit).toHaveBeenCalled(); }); - - it('should be enabled', () => { - component.isSubmitting = false; - - fixture.detectChanges(); - - const buttonElement: HTMLButtonElement = getElementFromFixture(fixture, saveButton); - expect(buttonElement.disabled).toBe(false); - }); - - it('should be disabled during submit', () => { - component.isSubmitting = true; - - fixture.detectChanges(); - - const buttonElement: HTMLButtonElement = getElementFromFixture(fixture, saveButton); - expect(buttonElement.disabled).toBe(true); - }); }); }); diff --git a/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.ts b/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.ts index ed07440a3ad89e84e7fd0787b410f232f597c1b6..0a56b56ad85f682fdbd327eade606509e833acae 100644 --- a/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.ts +++ b/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.ts @@ -8,16 +8,11 @@ import { PostfachFormService } from './postfach.formservice'; providers: [PostfachFormService], }) export class PostfachFormComponent { - public isSubmitting = false; - constructor(public formService: PostfachFormService) {} protected readonly PostfachFormService = PostfachFormService; submit() { - this.isSubmitting = true; - this.formService.submit().subscribe(() => { - this.isSubmitting = false; - }); + this.formService.submit(); } }