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
61ef3c2c
Commit
61ef3c2c
authored
Aug 12, 2016
by
Matthew Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch ordering
so `intl` comes first
parent
0d9493de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/components/registration/steps.jsx
src/components/registration/steps.jsx
+8
-6
No files found.
src/components/registration/steps.jsx
View file @
61ef3c2c
...
@@ -27,12 +27,14 @@ var Tooltip = require('../../components/tooltip/tooltip.jsx');
...
@@ -27,12 +27,14 @@ var Tooltip = require('../../components/tooltip/tooltip.jsx');
require
(
'
./steps.scss
'
);
require
(
'
./steps.scss
'
);
var
DEFAULT_COUNTRY
=
'
us
'
;
var
DEFAULT_COUNTRY
=
'
us
'
;
var
getCountryOptions
=
function
(
defaultCountry
,
intl
)
{
if
(
typeof
intl
===
'
undefined
'
)
{
intl
=
defaultCountry
;
defaultCountry
=
undefined
;
}
/**
* Return a list of options to give to frc select
* @param {Object} intl react-intl, used to localize strings
* @param {String} defaultCountry optional string of default country to put at top of list
* @return {Object} ordered set of county options formatted for frc select
*/
var
getCountryOptions
=
function
(
intl
,
defaultCountry
)
{
var
options
=
countryData
.
countryOptions
.
concat
({
var
options
=
countryData
.
countryOptions
.
concat
({
label
:
intl
.
formatMessage
({
id
:
'
registration.selectCountry
'
}),
label
:
intl
.
formatMessage
({
id
:
'
registration.selectCountry
'
}),
disabled
:
true
,
disabled
:
true
,
...
@@ -352,7 +354,7 @@ module.exports = {
...
@@ -352,7 +354,7 @@ module.exports = {
</
div
>
</
div
>
<
Select
label=
{
formatMessage
({
id
:
'
general.country
'
})
}
<
Select
label=
{
formatMessage
({
id
:
'
general.country
'
})
}
name=
"user.country"
name=
"user.country"
options=
{
getCountryOptions
(
DEFAULT_COUNTRY
,
this
.
props
.
intl
)
}
options=
{
getCountryOptions
(
this
.
props
.
intl
,
DEFAULT_COUNTRY
)
}
required
/>
required
/>
<
Checkbox
className=
"demographics-checkbox-is-robot"
<
Checkbox
className=
"demographics-checkbox-is-robot"
label=
"I'm a robot!"
label=
"I'm a robot!"
...
...
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