diff options
Diffstat (limited to 'client/src/app/shared/shared-moderation/batch-domains-modal.component.ts')
-rw-r--r-- | client/src/app/shared/shared-moderation/batch-domains-modal.component.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts b/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts index 6edbb6023..20be728f6 100644 --- a/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts +++ b/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts | |||
@@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angu | |||
2 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 2 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' |
3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
4 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 4 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
5 | import { DOMAINS_VALIDATOR, getNotEmptyHosts } from '../form-validators/batch-domains-validators' | 5 | import { splitAndGetNotEmpty, UNIQUE_HOSTS_VALIDATOR } from '../form-validators/host-validators' |
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
8 | selector: 'my-batch-domains-modal', | 8 | selector: 'my-batch-domains-modal', |
@@ -28,7 +28,7 @@ export class BatchDomainsModalComponent extends FormReactive implements OnInit { | |||
28 | if (!this.action) this.action = $localize`Process domains` | 28 | if (!this.action) this.action = $localize`Process domains` |
29 | 29 | ||
30 | this.buildForm({ | 30 | this.buildForm({ |
31 | domains: DOMAINS_VALIDATOR | 31 | hosts: UNIQUE_HOSTS_VALIDATOR |
32 | }) | 32 | }) |
33 | } | 33 | } |
34 | 34 | ||
@@ -41,9 +41,7 @@ export class BatchDomainsModalComponent extends FormReactive implements OnInit { | |||
41 | } | 41 | } |
42 | 42 | ||
43 | submit () { | 43 | submit () { |
44 | this.domains.emit( | 44 | this.domains.emit(splitAndGetNotEmpty(this.form.controls['hosts'].value)) |
45 | getNotEmptyHosts(this.form.controls['domains'].value) | ||
46 | ) | ||
47 | this.form.reset() | 45 | this.form.reset() |
48 | this.hide() | 46 | this.hide() |
49 | } | 47 | } |