From 2973559ed9af802ca72e2fea9bb5d4e7a0dc00fe Mon Sep 17 00:00:00 2001
From: FORESTIER Fabien <fabien.forestier@soprasteria.com>
Date: Mon, 29 Oct 2018 18:03:40 +0100
Subject: [PATCH] [hotfix] Fix bug that made impossible to send an email

---
 src/app/core/components/contact/contact.component.html | 2 +-
 src/app/core/components/contact/contact.component.ts   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/app/core/components/contact/contact.component.html b/src/app/core/components/contact/contact.component.html
index 306e60a7..742788f9 100644
--- a/src/app/core/components/contact/contact.component.html
+++ b/src/app/core/components/contact/contact.component.html
@@ -179,7 +179,7 @@
 
         <div class="has-text-right button-wrapper">
           <button class="button button-gl is-outlined" type="button" [disabled]="formDisabled" (click)="cancel()" i18n="@@contact.cancel">Cancel</button>
-          <button type="submit" class="button button-gl" [ngClass]="{'is-loading': formDisabled}" [disabled]="formIsInvalid() || formDisabled"
+          <button type="submit" class="button button-gl" [ngClass]="{'is-loading': formDisabled}" [disabled]="formIsInvalid || formDisabled"
             i18n="@@contact.send">Send</button>
         </div>
       </div>
diff --git a/src/app/core/components/contact/contact.component.ts b/src/app/core/components/contact/contact.component.ts
index f8fc4dc5..e06099f8 100644
--- a/src/app/core/components/contact/contact.component.ts
+++ b/src/app/core/components/contact/contact.component.ts
@@ -97,7 +97,7 @@ export class ContactComponent implements OnInit {
 
   // Return true if one of the fields at least doesn't respect its validators
   // or if the confirmation email is different from the email
-  formIsInvalid() {
+  get formIsInvalid() {
     const controls = this.form.controls;
     const value = this.form.invalid || this.emailConfirmationError;
     return value;
-- 
GitLab