Update translations
This commit is contained in:
parent
d3e56c0c4b
commit
26a008fe8d
|
@ -1,5 +1,5 @@
|
||||||
import { Component, OnInit, ViewChild } from '@angular/core'
|
import { Component, OnInit, ViewChild } from '@angular/core'
|
||||||
import { Notifier } from '@app/core'
|
import { Notifier, ServerService } from '@app/core'
|
||||||
import { I18n } from '@ngx-translate/i18n-polyfill'
|
import { I18n } from '@ngx-translate/i18n-polyfill'
|
||||||
import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
|
import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
|
||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
||||||
|
@ -24,12 +24,17 @@ export class ContactAdminModalComponent extends FormReactive implements OnInit {
|
||||||
private modalService: NgbModal,
|
private modalService: NgbModal,
|
||||||
private instanceValidatorsService: InstanceValidatorsService,
|
private instanceValidatorsService: InstanceValidatorsService,
|
||||||
private instanceService: InstanceService,
|
private instanceService: InstanceService,
|
||||||
|
private serverService: ServerService,
|
||||||
private notifier: Notifier,
|
private notifier: Notifier,
|
||||||
private i18n: I18n
|
private i18n: I18n
|
||||||
) {
|
) {
|
||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get instanceName () {
|
||||||
|
return this.serverService.getConfig().instance.name
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit () {
|
ngOnInit () {
|
||||||
this.buildForm({
|
this.buildForm({
|
||||||
fromName: this.instanceValidatorsService.FROM_NAME,
|
fromName: this.instanceValidatorsService.FROM_NAME,
|
||||||
|
|
|
@ -11,7 +11,7 @@ export abstract class FormReactive {
|
||||||
protected formChanged = false
|
protected formChanged = false
|
||||||
|
|
||||||
form: FormGroup
|
form: FormGroup
|
||||||
formErrors: FormReactiveErrors
|
formErrors: any // To avoid casting in template because of string | FormReactiveErrors
|
||||||
validationMessages: FormReactiveValidationMessages
|
validationMessages: FormReactiveValidationMessages
|
||||||
|
|
||||||
buildForm (obj: BuildFormArgument, defaultValues: BuildFormDefaultValues = {}) {
|
buildForm (obj: BuildFormArgument, defaultValues: BuildFormDefaultValues = {}) {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -30,6 +30,8 @@ describe('Test contact form', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should send a contact form', async function () {
|
it('Should send a contact form', async function () {
|
||||||
|
this.timeout(10000)
|
||||||
|
|
||||||
await sendContactForm({
|
await sendContactForm({
|
||||||
url: server.url,
|
url: server.url,
|
||||||
fromEmail: 'toto@example.com',
|
fromEmail: 'toto@example.com',
|
||||||
|
|
Loading…
Reference in New Issue