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
cd3eafe9
Commit
cd3eafe9
authored
Jul 26, 2016
by
Ray Schamp
Committed by
GitHub
Jul 26, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #754 from rschamp/bugfix/747
Make the student registration views more consistent with each other
parents
401edb35
74f56d42
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
21 deletions
+24
-21
src/views/studentcompleteregistration/studentcompleteregistration.jsx
...udentcompleteregistration/studentcompleteregistration.jsx
+22
-21
src/views/studentregistration/studentregistration.jsx
src/views/studentregistration/studentregistration.jsx
+2
-0
No files found.
src/views/studentcompleteregistration/studentcompleteregistration.jsx
View file @
cd3eafe9
...
...
@@ -90,18 +90,18 @@ var StudentCompleteRegistration = intl.injectIntl(React.createClass({
var
demographicsDescription
=
this
.
props
.
intl
.
formatMessage
({
id
:
'
registration.studentPersonalStepDescription
'
});
var
registrationErrors
=
this
.
state
.
registrationErrors
;
var
sessionFetched
=
this
.
props
.
session
.
status
===
sessionStatus
.
FETCHED
;
if
(
sessionFetched
&&
!
(
this
.
props
.
session
.
session
.
permissions
.
student
&&
this
.
props
.
session
.
session
.
flags
.
must_complete_registration
))
{
if
(
this
.
props
.
session
.
status
===
sessionStatus
.
FETCHED
&&
!
(
this
.
props
.
session
.
session
.
permissions
&&
this
.
props
.
session
.
session
.
permissions
.
student
&&
this
.
props
.
session
.
session
.
flags
.
must_complete_registration
)
)
{
registrationErrors
=
{
__all__
:
this
.
props
.
intl
.
formatMessage
({
id
:
'
registration.mustBeNewStudent
'
})
};
}
return
(
<
Deck
className=
"student-registration"
>
{
sessionFetched
&&
this
.
state
.
classroom
?
(
registrationErrors
?
{
registrationErrors
?
(
<
Steps
.
RegistrationError
>
<
ul
>
{
Object
.
keys
(
registrationErrors
).
map
(
function
(
field
)
{
...
...
@@ -113,7 +113,10 @@ var StudentCompleteRegistration = intl.injectIntl(React.createClass({
})
}
</
ul
>
</
Steps
.
RegistrationError
>
:
)
:
(
this
.
state
.
waiting
||
!
this
.
state
.
classroom
?
(
<
Spinner
/>
)
:
(
<
Progression
{
...
this
.
state
}
>
<
Steps
.
ClassInviteStep
classroom=
{
this
.
state
.
classroom
}
messages=
{
this
.
props
.
messages
}
...
...
@@ -134,9 +137,7 @@ var StudentCompleteRegistration = intl.injectIntl(React.createClass({
waiting=
{
this
.
state
.
waiting
}
/>
</
Progression
>
)
:
<
Spinner
/>
}
)
}
</
Deck
>
);
}
...
...
src/views/studentregistration/studentregistration.jsx
View file @
cd3eafe9
...
...
@@ -35,10 +35,12 @@ var StudentRegistration = intl.injectIntl(React.createClass({
});
},
componentDidMount
:
function
()
{
this
.
setState
({
waiting
:
true
});
api
({
uri
:
'
/classrooms/
'
+
this
.
props
.
classroomId
,
params
:
{
token
:
this
.
props
.
classroomToken
}
},
function
(
err
,
body
,
res
)
{
this
.
setState
({
waiting
:
false
});
if
(
err
)
{
return
this
.
setState
({
registrationError
:
this
.
props
.
intl
.
formatMessage
({
...
...
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