From 7ed1edbbe4ffbef28093e4f5630751cb652814e4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Aug 2020 11:47:04 +0200 Subject: We don't need services anymore for validators --- .../about-instance/contact-admin-modal.component.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'client/src/app/+about/about-instance/contact-admin-modal.component.ts') diff --git a/client/src/app/+about/about-instance/contact-admin-modal.component.ts b/client/src/app/+about/about-instance/contact-admin-modal.component.ts index 215e281bb..11e442f6b 100644 --- a/client/src/app/+about/about-instance/contact-admin-modal.component.ts +++ b/client/src/app/+about/about-instance/contact-admin-modal.component.ts @@ -1,6 +1,12 @@ import { Component, OnInit, ViewChild } from '@angular/core' import { Notifier, ServerService } from '@app/core' -import { FormReactive, FormValidatorService, InstanceValidatorsService } from '@app/shared/shared-forms' +import { + BODY_VALIDATOR, + FROM_EMAIL_VALIDATOR, + FROM_NAME_VALIDATOR, + SUBJECT_VALIDATOR +} from '@app/shared/form-validators/instance-validators' +import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' import { InstanceService } from '@app/shared/shared-instance' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' @@ -22,7 +28,6 @@ export class ContactAdminModalComponent extends FormReactive implements OnInit { constructor ( protected formValidatorService: FormValidatorService, private modalService: NgbModal, - private instanceValidatorsService: InstanceValidatorsService, private instanceService: InstanceService, private serverService: ServerService, private notifier: Notifier @@ -40,10 +45,10 @@ export class ContactAdminModalComponent extends FormReactive implements OnInit { .subscribe(config => this.serverConfig = config) this.buildForm({ - fromName: this.instanceValidatorsService.FROM_NAME, - fromEmail: this.instanceValidatorsService.FROM_EMAIL, - subject: this.instanceValidatorsService.SUBJECT, - body: this.instanceValidatorsService.BODY + fromName: FROM_NAME_VALIDATOR, + fromEmail: FROM_EMAIL_VALIDATOR, + subject: SUBJECT_VALIDATOR, + body: BODY_VALIDATOR }) } -- cgit v1.2.3