Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
3c744bed
Commit
3c744bed
authored
May 08, 2020
by
Chris Garrity
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Help widget
Enable Helpwidget, but keep showing the form for iOS 10 and lower.
parent
3a2efeff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
86 deletions
+58
-86
src/views/contact-us/contact-us.jsx
src/views/contact-us/contact-us.jsx
+58
-86
No files found.
src/views/contact-us/contact-us.jsx
View file @
3c744bed
...
...
@@ -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
(
<
InformationPage
title=
{
CONTACT_US_POPUP
?
this
.
props
.
intl
.
formatMessage
({
id
:
'
contactUs.qTitle
'
})
:
this
.
props
.
intl
.
formatMessage
({
id
:
'
contactUs.title
'
})
}
title=
{
this
.
props
.
intl
.
formatMessage
({
id
:
'
contactUs.qTitle
'
})
}
>
{
!
CONTACT_US_POPUP
&&
(
<
div
className=
"inner info-inner"
>
<
section
id=
"contact-us"
>
<
span
className=
"nav-spacer"
/>
<
p
><
FormattedMessage
id=
"contactUs.intro"
values=
{
{
faqLink
:
(
<
a
href=
"/info/faq"
><
FormattedMessage
id=
"contactUs.faqLinkText"
/></
a
>
<
div
className=
"contact-us inner info-inner"
>
<
section
className=
"helpwidget"
id=
"contact-us"
>
<
span
className=
"nav-spacer"
/>
<
h3
>
<
FormattedMessage
id=
"contactUs.seeFaq"
/>
</
h3
>
<
p
><
FormattedMessage
id=
"contactUs.faqInfo"
values=
{
{
faqLink
:
(
<
a
href=
"/info/faq"
><
FormattedMessage
id=
"contactUs.faqLinkText"
/></
a
>
)}
}
/></
p
>
<
h3
>
<
FormattedMessage
id=
"contactUs.askCommunity"
/>
</
h3
>
<
p
><
FormattedMessage
id=
"contactUs.forumsIntro"
/></
p
>
<
p
><
FormattedMessage
id=
"contactUs.forumsHelp"
/></
p
>
<
ul
>
<
li
><
FormattedMessage
id=
"contactUs.questionsText"
values=
{
{
questionsLink
:
(
<
a
href=
"/discuss/4/"
><
FormattedMessage
id=
"contactUs.questionsLinkText"
/></
a
>
)}
}
/></
p
>
<
p
><
FormattedMessage
id=
"contactUs.forumsInfo"
/></
p
>
<
ul
>
<
li
><
FormattedMessage
id=
"contactUs.questionsForum"
values=
{
{
questionsLink
:
(
<
a
href=
"/discuss/4/"
><
FormattedMessage
id=
"contactUs.questionsLinkText"
/></
a
>
)}
}
/></
li
>
<
li
><
FormattedMessage
id=
"contactUs.scriptsForum"
values=
{
{
scriptsLink
:
(
<
a
href=
"/discuss/7/"
><
FormattedMessage
id=
"contactUs.scriptsLinkText"
/></
a
>
)}
}
/></
li
>
<
li
><
FormattedMessage
id=
"contactUs.bugsForum"
values=
{
{
bugsLink
:
(
<
a
href=
"/discuss/3/"
><
FormattedMessage
id=
"contactUs.bugsLinkText"
/></
a
>
)}
}
/></
li
>
</
ul
>
<
p
><
FormattedMessage
id=
"contactUs.formIntro"
/></
p
>
</
section
>
</
div
>
)
}
{
CONTACT_US_POPUP
&&
(
<
div
className=
"contact-us inner info-inner"
>
<
section
className=
"helpwidget"
id=
"contact-us"
>
<
span
className=
"nav-spacer"
/>
<
h3
>
<
FormattedMessage
id=
"contactUs.seeFaq"
/>
</
h3
>
<
p
><
FormattedMessage
id=
"contactUs.faqInfo"
values=
{
{
faqLink
:
(
<
a
href=
"/info/faq"
><
FormattedMessage
id=
"contactUs.faqLinkText"
/></
a
>
/></
li
>
<
li
><
FormattedMessage
id=
"contactUs.scriptsText"
values=
{
{
scriptsLink
:
(
<
a
href=
"/discuss/7/"
><
FormattedMessage
id=
"contactUs.scriptsLinkText"
/></
a
>
)}
}
/></
p
>
<
h3
>
<
FormattedMessage
id=
"contactUs.askCommunity"
/>
</
h3
>
<
p
><
FormattedMessage
id=
"contactUs.forumsIntro"
/></
p
>
<
p
><
FormattedMessage
id=
"contactUs.forumsHelp"
/></
p
>
<
ul
>
<
li
><
FormattedMessage
id=
"contactUs.questionsText"
values=
{
{
questionsLink
:
(
<
a
href=
"/discuss/4/"
><
FormattedMessage
id=
"contactUs.questionsLinkText"
/></
a
>
)}
}
/></
li
>
<
li
><
FormattedMessage
id=
"contactUs.scriptsText"
values=
{
{
scriptsLink
:
(
<
a
href=
"/discuss/7/"
><
FormattedMessage
id=
"contactUs.scriptsLinkText"
/></
a
>
)}
}
/></
li
>
<
li
><
FormattedMessage
id=
"contactUs.bugsText"
values=
{
{
bugsLink
:
(
<
a
href=
"/discuss/3/"
><
FormattedMessage
id=
"contactUs.bugsLinkText"
/></
a
>
)}
}
/></
li
>
</
ul
>
<
h3
>
<
FormattedMessage
id=
"contactUs.needSupport"
/>
</
h3
>
/></
li
>
<
li
><
FormattedMessage
id=
"contactUs.bugsText"
values=
{
{
bugsLink
:
(
<
a
href=
"/discuss/3/"
><
FormattedMessage
id=
"contactUs.bugsLinkText"
/></
a
>
)}
}
/></
li
>
</
ul
>
<
h3
>
<
FormattedMessage
id=
"contactUs.needSupport"
/>
</
h3
>
{
this
.
state
.
showForm
?
(
<
p
><
FormattedMessage
id=
"contactUs.formIntro"
/></
p
>
)
:
(
<
p
>
<
FormattedMessage
id=
"contactUs.supportInfo"
...
...
@@ -132,21 +102,23 @@ class ContactUs extends React.Component {
)}
}
/>
</
p
>
</
section
>
)
}
</
section
>
{
!
this
.
state
.
showForm
&&
(
<
HelpWidget
button
body=
{
this
.
state
.
body
}
subject=
{
this
.
state
.
subject
}
/>
</
div
>
)
}
)
}
</
div
>
<
nav
>
<
ol
>
<
li
className=
"nav-header"
><
FormattedMessage
id=
"contactUs.findHelp"
/></
li
>
<
li
><
a
href=
"/info/faq"
><
FormattedMessage
id=
"contactUs.faqLinkText"
/></
a
></
li
>
</
ol
>
</
nav
>
{
!
CONTACT_US_POPUP
&&
(
{
this
.
state
.
showForm
&&
(
<
HelpForm
body=
{
this
.
state
.
body
}
subject=
{
this
.
state
.
subject
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment