diff options
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/+about/about-instance/contact-admin-modal.component.ts | 7 | ||||
-rw-r--r-- | client/src/app/shared/forms/form-reactive.ts | 2 |
2 files changed, 7 insertions, 2 deletions
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 2f707bd53..7d79c2215 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,5 +1,5 @@ | |||
1 | import { Component, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, OnInit, ViewChild } from '@angular/core' |
2 | import { Notifier } from '@app/core' | 2 | import { Notifier, ServerService } from '@app/core' |
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | 3 | import { I18n } from '@ngx-translate/i18n-polyfill' |
4 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | 4 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' |
5 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 5 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
@@ -24,12 +24,17 @@ export class ContactAdminModalComponent extends FormReactive implements OnInit { | |||
24 | private modalService: NgbModal, | 24 | private modalService: NgbModal, |
25 | private instanceValidatorsService: InstanceValidatorsService, | 25 | private instanceValidatorsService: InstanceValidatorsService, |
26 | private instanceService: InstanceService, | 26 | private instanceService: InstanceService, |
27 | private serverService: ServerService, | ||
27 | private notifier: Notifier, | 28 | private notifier: Notifier, |
28 | private i18n: I18n | 29 | private i18n: I18n |
29 | ) { | 30 | ) { |
30 | super() | 31 | super() |
31 | } | 32 | } |
32 | 33 | ||
34 | get instanceName () { | ||
35 | return this.serverService.getConfig().instance.name | ||
36 | } | ||
37 | |||
33 | ngOnInit () { | 38 | ngOnInit () { |
34 | this.buildForm({ | 39 | this.buildForm({ |
35 | fromName: this.instanceValidatorsService.FROM_NAME, | 40 | fromName: this.instanceValidatorsService.FROM_NAME, |
diff --git a/client/src/app/shared/forms/form-reactive.ts b/client/src/app/shared/forms/form-reactive.ts index 2d0e8359f..b9873af2c 100644 --- a/client/src/app/shared/forms/form-reactive.ts +++ b/client/src/app/shared/forms/form-reactive.ts | |||
@@ -11,7 +11,7 @@ export abstract class FormReactive { | |||
11 | protected formChanged = false | 11 | protected formChanged = false |
12 | 12 | ||
13 | form: FormGroup | 13 | form: FormGroup |
14 | formErrors: FormReactiveErrors | 14 | formErrors: any // To avoid casting in template because of string | FormReactiveErrors |
15 | validationMessages: FormReactiveValidationMessages | 15 | validationMessages: FormReactiveValidationMessages |
16 | 16 | ||
17 | buildForm (obj: BuildFormArgument, defaultValues: BuildFormDefaultValues = {}) { | 17 | buildForm (obj: BuildFormArgument, defaultValues: BuildFormDefaultValues = {}) { |