Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Kotahi
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Omo Oaiya
Kotahi
Commits
ef00bc56
Commit
ef00bc56
authored
4 years ago
by
Mihail Gorceag
Browse files
Options
Downloads
Patches
Plain Diff
fix: disable form popup for ncrc
parent
11c5ec2c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/components/component-submit/src/components/FormTemplate.js
+28
-25
28 additions, 25 deletions
...omponents/component-submit/src/components/FormTemplate.js
with
28 additions
and
25 deletions
app/components/component-submit/src/components/FormTemplate.js
+
28
−
25
View file @
ef00bc56
...
@@ -187,31 +187,34 @@ const FormTemplate = ({
...
@@ -187,31 +187,34 @@ const FormTemplate = ({
})
=>
{
})
=>
{
const
client
=
useApolloClient
()
const
client
=
useApolloClient
()
const
submitButton
=
(
text
,
haspopup
=
false
)
=>
(
const
submitButton
=
(
text
,
haspopup
=
false
)
=>
{
<
div
>
return
(
<
Button
<
div
>
onClick
=
{
async
()
=>
{
<
Button
const
hasErrors
=
Object
.
keys
(
await
validateForm
()).
length
!==
0
onClick
=
{
async
()
=>
{
const
hasErrors
=
Object
.
keys
(
await
validateForm
()).
length
!==
0
// If there are errors, do a fake submit
// to focus on the error
// If there are errors, do a fake submit
if
(
// to focus on the error
hasErrors
||
if
(
values
.
status
===
articleStatuses
.
evaluated
||
hasErrors
||
(
values
.
status
===
articleStatuses
.
submitted
&&
!
haspopup
)
values
.
status
===
articleStatuses
.
evaluated
||
)
{
values
.
status
===
articleStatuses
.
submitted
||
handleSubmit
()
!
haspopup
}
else
{
)
{
toggleConfirming
()
handleSubmit
()
}
}
else
{
}}
toggleConfirming
()
primary
}
type
=
"
button
"
}}
>
primary
{
text
}
type
=
"
button
"
<
/Button
>
>
<
/div
>
{
text
}
)
<
/Button
>
<
/div
>
)
}
const
submitButtonText
=
match
.
url
.
includes
(
'
/evaluation
'
)
const
submitButtonText
=
match
.
url
.
includes
(
'
/evaluation
'
)
?
'
Submit Evaluation
'
?
'
Submit Evaluation
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment