Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
form-creator-ui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simmctic
form-creator
form-creator-ui
Merge requests
!39
Issue
#42
: Detection on user leaving
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#42
: Detection on user leaving
issue/42-Detection
into
development
Overview
0
Commits
1
Pipelines
0
Changes
2
Merged
Richard Fernando Heise Ferreira
requested to merge
issue/42-Detection
into
development
4 years ago
Overview
0
Commits
1
Pipelines
0
Changes
2
Expand
closes
#42 (closed)
0
0
Merge request reports
Compare
development
development (base)
and
latest version
latest version
057cdd97
1 commit,
4 years ago
2 files
+
27
−
19
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/components/fieldsDisplayForm/DisplayForm.js
+
23
−
19
Options
@@ -17,39 +17,39 @@ import { FormEditionContext } from "../../contexts/FormContext";
import
useForm
from
"
../../contexts/useForm
"
;
import
SubmitButton
from
"
./SubmitButton
"
;
/** CSS styles used on page components */
const
useStyles
=
makeStyles
(
(
theme
)
=>
({
const
useStyles
=
makeStyles
(
theme
=>
({
app
:
{
margin
:
"
0
"
,
padding
:
"
40px
"
,
display
:
"
flex
"
,
[
"
@media (max-width: 600px)
"
]:
{
flexDirection
:
"
column-reverse
"
,
justifyContent
:
"
flex-end
"
,
justifyContent
:
"
flex-end
"
},
paddingBottom
:
"
78px
"
,
[
"
@media (min-width: 600px)
"
]:
{
minHeight
:
"
calc(100vh - 92.4px - 78px -60px)
"
,
minHeight
:
"
calc(100vh - 92.4px - 78px -60px)
"
},
minHeight
:
"
calc(100vh - 71.6px - 78px -60px)
"
,
marginBottom
:
"
60px
"
,
marginBottom
:
"
60px
"
},
addButton
:
{
fontSize
:
"
100%
"
,
fontSize
:
"
100%
"
},
sideMenuFormatingGrid
:
{
[
"
@media (max-width:600px)
"
]:
{
marginTop
:
"
-90px
"
,
}
,
marginTop
:
"
-90px
"
}
},
sizeFormating
:
{
[
"
@media (max-width:600px)
"
]:
{
[
"
@media (max-width:430px)
"
]:
{
marginLeft
:
"
1%
"
,
width
:
"
95%
"
,
width
:
"
95%
"
},
marginLeft
:
"
2%
"
,
}
,
}
,
marginLeft
:
"
2%
"
}
}
}));
/** CSS style used through Material Ui. */
const
theme
=
createMuiTheme
({
@@ -57,19 +57,19 @@ const theme = createMuiTheme({
MuiInput
:
{
underline
:
{
"
&:before
"
:
{
borderBottom
:
"
1px solid #35c7fc
"
,
borderBottom
:
"
1px solid #35c7fc
"
},
"
&:after
"
:
{
borderBottom
:
"
1px solid #3f51b5
"
,
}
,
}
,
borderBottom
:
"
1px solid #3f51b5
"
}
}
},
MuiButton
:
{
label
:
{
color
:
"
white
"
,
}
,
}
,
}
,
color
:
"
white
"
}
}
}
});
/** Main function that returns the children that composes the form creation or edition page. */
function
DisplayForm
()
{
@@ -90,6 +90,10 @@ function DisplayForm() {
*/
useEffect
(()
=>
{
setValidToSend
(
verifyError
(
form
));
window
.
onbeforeunload
=
confirmExit
;
function
confirmExit
()
{
return
"
show warning
"
;
}
},
[
form
]);
return
(
<
MuiThemeProvider
theme
=
{
theme
}
>
Loading