From 3c744bed4c393c94c3897f5e2196005bfc439119 Mon Sep 17 00:00:00 2001 From: Chris Garrity Date: Fri, 8 May 2020 13:02:07 -0400 Subject: [PATCH] Enable Help widget Enable Helpwidget, but keep showing the form for iOS 10 and lower. --- src/views/contact-us/contact-us.jsx | 144 +++++++++++----------------- 1 file changed, 58 insertions(+), 86 deletions(-) diff --git a/src/views/contact-us/contact-us.jsx b/src/views/contact-us/contact-us.jsx index 9ae06031b..03b9e95fd 100644 --- a/src/views/contact-us/contact-us.jsx +++ b/src/views/contact-us/contact-us.jsx @@ -8,7 +8,7 @@ const render = require('../../lib/render.jsx'); const HelpForm = require('../../components/helpform/helpform.jsx'); const HelpWidget = require('../../components/helpwidget/helpwidget.jsx'); -const {CONTACT_US_POPUP} = require('../../lib/feature-flags.js'); +const bowser = require('bowser'); const InformationPage = require('../../components/informationpage/informationpage.jsx'); require('./contact-us.scss'); @@ -18,7 +18,8 @@ class ContactUs extends React.Component { super(props); this.state = { subject: '', - body: '' + body: '', + showForm: false }; const query = window.location.search; let scratchId = ''; @@ -34,93 +35,62 @@ class ContactUs extends React.Component { } else if (query.indexOf('confirmation=') !== -1) { this.state.subject = 'Problem with email confirmation'; } + // older iPads (iOS 10 or lower) cannot show help widget, show the form instead + if (bowser.osname === 'iOS' && parseInt(bowser.osversion, 10) < 11) { + this.state.showForm = true; + } } render () { return ( - {!CONTACT_US_POPUP && ( -
-
- -

+

+
+ +

+ +

+

+ )}} + />

+

+ +

+

+

+
    +
  • )}} - />

    -

    -
      -
    • - )}} - />
    • -
    • - )}} - />
    • -
    • - )}} - />
    • -
    + />
  • +
  • + )}} + />
  • +
  • + )}} + />
  • +
+

+ +

+ {this.state.showForm ? (

-
-
- )} - {CONTACT_US_POPUP && ( -
-
- -

- -

-

- )}} - />

-

- -

-

-

-
    -
  • - )}} - />
  • -
  • - )}} - />
  • -
  • - )}} - />
  • -
-

- -

+ ) : (

-
+ )} +
+ {!this.state.showForm && ( -
- )} + )} + - {!CONTACT_US_POPUP && ( + {this.state.showForm && (