Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
editoria
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
Container Registry
Operate
Environments
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
Yannis Barlas
editoria
Commits
2e7979a4
Commit
2e7979a4
authored
7 years ago
by
john
Browse files
Options
Downloads
Patches
Plain Diff
make upload warning message dynamic
parent
8f2a2e69
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/components/BookBuilder/Chapter/UploadButton.jsx
+3
-1
3 additions, 1 deletion
app/components/BookBuilder/Chapter/UploadButton.jsx
app/components/BookBuilder/Chapter/UploadWarningModal.jsx
+5
-2
5 additions, 2 deletions
app/components/BookBuilder/Chapter/UploadWarningModal.jsx
with
8 additions
and
3 deletions
app/components/BookBuilder/Chapter/UploadButton.jsx
+
3
−
1
View file @
2e7979a4
...
@@ -75,13 +75,15 @@ export class UploadButton extends React.Component {
...
@@ -75,13 +75,15 @@ export class UploadButton extends React.Component {
if
(
!
this
.
isLocked
())
return
null
if
(
!
this
.
isLocked
())
return
null
const
{
showModal
}
=
this
.
state
const
{
showModal
}
=
this
.
state
const
{
modalContainer
}
=
this
.
props
const
{
chapter
,
modalContainer
}
=
this
.
props
const
type
=
chapter
.
subCategory
return
(
return
(
<
UploadWarningModal
<
UploadWarningModal
container
=
{
modalContainer
}
container
=
{
modalContainer
}
show
=
{
showModal
}
show
=
{
showModal
}
toggle
=
{
this
.
toggleModal
}
toggle
=
{
this
.
toggleModal
}
type
=
{
type
}
/>
/>
)
)
}
}
...
...
This diff is collapsed.
Click to expand it.
app/components/BookBuilder/Chapter/UploadWarningModal.jsx
+
5
−
2
View file @
2e7979a4
...
@@ -4,9 +4,11 @@ import AbstractModal from '../../common/AbstractModal'
...
@@ -4,9 +4,11 @@ import AbstractModal from '../../common/AbstractModal'
class
UploadWarningModal
extends
React
.
Component
{
class
UploadWarningModal
extends
React
.
Component
{
renderBody
()
{
renderBody
()
{
const
{
type
}
=
this
.
props
return
(
return
(
<
div
>
<
div
>
You are not allowed to import contents while a
chapter
is being edited.
You are not allowed to import contents while a
{
type
}
is being edited.
</
div
>
</
div
>
)
)
}
}
...
@@ -31,7 +33,8 @@ class UploadWarningModal extends React.Component {
...
@@ -31,7 +33,8 @@ class UploadWarningModal extends React.Component {
UploadWarningModal
.
propTypes
=
{
UploadWarningModal
.
propTypes
=
{
container
:
React
.
PropTypes
.
object
.
isRequired
,
container
:
React
.
PropTypes
.
object
.
isRequired
,
show
:
React
.
PropTypes
.
bool
.
isRequired
,
show
:
React
.
PropTypes
.
bool
.
isRequired
,
toggle
:
React
.
PropTypes
.
func
.
isRequired
toggle
:
React
.
PropTypes
.
func
.
isRequired
,
type
:
React
.
PropTypes
.
string
.
isRequired
}
}
export
default
UploadWarningModal
export
default
UploadWarningModal
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