Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kszkepzes-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
JetBrains YouTrack
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
KSZK
DevTeam
kszkepzes
old
kszkepzes-frontend
Commits
681d6971
Commit
681d6971
authored
6 years ago
by
Bsandor453
Browse files
Options
Downloads
Patches
Plain Diff
Refactor and fix homework validation
parent
e1fbbb8c
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
src/components/forms/AddSolutionForm.js
+10
-8
10 additions, 8 deletions
src/components/forms/AddSolutionForm.js
src/components/forms/ConfirmModal.js
+1
-4
1 addition, 4 deletions
src/components/forms/ConfirmModal.js
with
11 additions
and
12 deletions
src/components/forms/AddSolutionForm.js
+
10
−
8
View file @
681d6971
...
...
@@ -33,6 +33,7 @@ class AddSolutionForm extends Component {
const
sentences
=
this
.
props
.
taskdesc
.
split
(
'
\n
'
);
const
note
=
''
;
const
disabledText
=
'
A határidő lejárt, további beadás nem lehetséges.
'
;
return
(
<
Modal
open
=
{
this
.
state
.
showModal
}
...
...
@@ -99,19 +100,16 @@ class AddSolutionForm extends Component {
button
=
{
<
Button
disabled
=
{
name
===
''
||
description
===
''
||
(
file
===
''
?
false
:
!
allowedFileTypes
.
includes
(
file
.
type
)
||
file
.
size
>
(
maxFileSize
)
*
(
1024
**
2
)
)
!
name
||
!
description
||
(
!
file
?
false
:
!
allowedFileTypes
.
includes
(
file
.
type
)
||
file
.
size
>
(
maxFileSize
)
*
(
1024
**
2
))
}
inverted
color
=
'
green
'
>
<
Icon
name
=
'
checkmark
'
/>
Beadás
<
/Button
>
}
}
text
=
'
beadod az új megoldást, ami felülírja az előzőt
'
onAccept
=
{()
=>
{
this
.
props
.
addSolution
({
...
...
@@ -126,7 +124,11 @@ class AddSolutionForm extends Component {
<
Button
inverted
color
=
'
green
'
disabled
=
{(
name
===
''
||
description
===
''
)}
disabled
=
{
!
name
||
!
description
||
(
!
file
?
false
:
!
allowedFileTypes
.
includes
(
file
.
type
)
||
file
.
size
>
(
maxFileSize
)
*
(
1024
**
2
))
}
onClick
=
{()
=>
{
this
.
props
.
addSolution
({
task
,
accepted
,
corrected
,
note
,
name
,
description
,
file
,
...
...
This diff is collapsed.
Click to expand it.
src/components/forms/ConfirmModal.js
+
1
−
4
View file @
681d6971
...
...
@@ -45,10 +45,7 @@ class ConfirmModal extends Component {
<
Button
color
=
'
green
'
inverted
onClick
=
{()
=>
{
onAccept
();
this
.
close
();
}
}
onClick
=
{()
=>
{
onAccept
();
this
.
close
();
}}
>
<
Icon
name
=
'
checkmark
'
/>
Igen
<
/Button
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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