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
8f5f89ab
Commit
8f5f89ab
authored
Aug 16, 2019
by
Ben Wheeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve email step in several ways
parent
7d17dc5d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
13 deletions
+15
-13
src/components/formik-forms/formik-input.scss
src/components/formik-forms/formik-input.scss
+5
-0
src/components/formik-forms/input.scss
src/components/formik-forms/input.scss
+0
-7
src/components/join-flow/email-step.jsx
src/components/join-flow/email-step.jsx
+9
-5
src/l10n.json
src/l10n.json
+1
-1
No files found.
src/components/formik-forms/formik-input.scss
View file @
8f5f89ab
...
@@ -25,4 +25,9 @@
...
@@ -25,4 +25,9 @@
outline
:
none
;
outline
:
none
;
}
}
}
}
&
:
:
placeholder
{
font-style
:
italic
;
color
:
$type-gray-75percent
;
}
}
}
src/components/formik-forms/input.scss
deleted
100644 → 0
View file @
7d17dc5d
@import
"../../colors"
;
@import
"../../frameless"
;
.
input
:
:
placeholder
{
font-style
:
italic
;
color
:
$type-gray-75percent
;
}
src/components/join-flow/email-step.jsx
View file @
8f5f89ab
...
@@ -17,12 +17,12 @@ class EmailStep extends React.Component {
...
@@ -17,12 +17,12 @@ class EmailStep extends React.Component {
super
(
props
);
super
(
props
);
bindAll
(
this
,
[
bindAll
(
this
,
[
'
handleValidSubmit
'
,
'
handleValidSubmit
'
,
'
validateEmail
IfPresent
'
,
'
validateEmail
'
,
'
validateForm
'
'
validateForm
'
]);
]);
}
}
validateEmail
IfPresent
(
email
)
{
validateEmail
(
email
)
{
if
(
!
email
)
return
null
;
// skip validation if email is blank; null indicates valid
if
(
!
email
)
return
this
.
props
.
intl
.
formatMessage
({
id
:
'
general.required
'
});
const
isValidLocally
=
emailValidator
.
validate
(
email
);
const
isValidLocally
=
emailValidator
.
validate
(
email
);
if
(
isValidLocally
)
{
if
(
isValidLocally
)
{
return
null
;
// TODO: validate email address remotely
return
null
;
// TODO: validate email address remotely
...
@@ -51,6 +51,7 @@ class EmailStep extends React.Component {
...
@@ -51,6 +51,7 @@ class EmailStep extends React.Component {
errors
,
errors
,
handleSubmit
,
handleSubmit
,
isSubmitting
,
isSubmitting
,
setFieldError
,
validateField
validateField
}
=
props
;
}
=
props
;
return
(
return
(
...
@@ -89,9 +90,12 @@ class EmailStep extends React.Component {
...
@@ -89,9 +90,12 @@ class EmailStep extends React.Component {
id=
"email"
id=
"email"
name=
"email"
name=
"email"
placeholder=
{
this
.
props
.
intl
.
formatMessage
({
id
:
'
general.emailAddress
'
})
}
placeholder=
{
this
.
props
.
intl
.
formatMessage
({
id
:
'
general.emailAddress
'
})
}
validate=
{
this
.
validateEmail
IfPresent
}
validate=
{
this
.
validateEmail
}
validationClassName=
"validation-full-width-input"
validationClassName=
"validation-full-width-input"
onBlur=
{
()
=>
validateField
(
'
email
'
)
}
// eslint-disable-line react/jsx-no-bind
/* eslint-disable react/jsx-no-bind */
onBlur=
{
()
=>
validateField
(
'
email
'
)
}
onFocus=
{
()
=>
setFieldError
(
'
email
'
,
null
)
}
/* eslint-enable react/jsx-no-bind */
/>
/>
</
JoinFlowStep
>
</
JoinFlowStep
>
);
);
...
...
src/l10n.json
View file @
8f5f89ab
...
@@ -192,7 +192,7 @@
...
@@ -192,7 +192,7 @@
"registration.studentUsernameStepHelpText"
:
"Already have a Scratch account?"
,
"registration.studentUsernameStepHelpText"
:
"Already have a Scratch account?"
,
"registration.studentUsernameStepTooltip"
:
"You'll need to create a new Scratch account to join this class."
,
"registration.studentUsernameStepTooltip"
:
"You'll need to create a new Scratch account to join this class."
,
"registration.studentUsernameFieldHelpText"
:
"For safety, don't use your real name!"
,
"registration.studentUsernameFieldHelpText"
:
"For safety, don't use your real name!"
,
"registration.acceptTermsOfUse"
:
"By creating an account,
I
accept and agree to the {touLink}."
,
"registration.acceptTermsOfUse"
:
"By creating an account,
you
accept and agree to the {touLink}."
,
"registration.usernameStepTitle"
:
"Request a Teacher Account"
,
"registration.usernameStepTitle"
:
"Request a Teacher Account"
,
"registration.usernameStepTitleScratcher"
:
"Create a Scratch Account"
,
"registration.usernameStepTitleScratcher"
:
"Create a Scratch Account"
,
"registration.validationMaxLength"
:
"Sorry, you have exceeded the maximum character limit."
,
"registration.validationMaxLength"
:
"Sorry, you have exceeded the maximum character limit."
,
...
...
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