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
59d55811
Commit
59d55811
authored
Aug 15, 2016
by
Matthew Taylor
Committed by
GitHub
Aug 15, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #836 from mewtaylor/issue/gh-760
Fix GH-760: Add username `not equals` to password validation
parents
e791c0a8
f8de61f0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
7 deletions
+10
-7
src/components/footer/conference/footer.scss
src/components/footer/conference/footer.scss
+1
-1
src/components/forms/validations.jsx
src/components/forms/validations.jsx
+1
-0
src/components/login/login.scss
src/components/login/login.scss
+2
-2
src/components/registration/steps.jsx
src/components/registration/steps.jsx
+3
-2
src/main.scss
src/main.scss
+1
-1
src/views/studentcompleteregistration/studentcompleteregistration.jsx
...udentcompleteregistration/studentcompleteregistration.jsx
+2
-1
No files found.
src/components/footer/conference/footer.scss
View file @
59d55811
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
.intel
{
.intel
{
img
{
img
{
max-height
:
50px
max-height
:
50px
;
}
}
}
}
}
}
...
...
src/components/forms/validations.jsx
View file @
59d55811
...
@@ -23,6 +23,7 @@ module.exports.validations = {
...
@@ -23,6 +23,7 @@ module.exports.validations = {
return
phoneNumberUtil
.
isValidNumber
(
parsed
);
return
phoneNumberUtil
.
isValidNumber
(
parsed
);
}
}
};
};
module
.
exports
.
validations
.
notEqualsUsername
=
module
.
exports
.
validations
.
notEquals
;
module
.
exports
.
validationHOCFactory
=
function
(
defaultValidationErrors
)
{
module
.
exports
.
validationHOCFactory
=
function
(
defaultValidationErrors
)
{
return
function
(
Component
)
{
return
function
(
Component
)
{
...
...
src/components/login/login.scss
View file @
59d55811
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
padding-top
:
5px
;
padding-top
:
5px
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.right
{
.right
{
float
:
right
;
float
:
right
;
}
}
.spinner
{
.spinner
{
margin
:
0
.8rem
;
margin
:
0
.8rem
;
width
:
1rem
;
width
:
1rem
;
...
...
src/components/registration/steps.jsx
View file @
59d55811
...
@@ -233,6 +233,7 @@ module.exports = {
...
@@ -233,6 +233,7 @@ module.exports = {
ChoosePasswordStep
:
intl
.
injectIntl
(
React
.
createClass
({
ChoosePasswordStep
:
intl
.
injectIntl
(
React
.
createClass
({
getDefaultProps
:
function
()
{
getDefaultProps
:
function
()
{
return
{
return
{
username
:
null
,
showPassword
:
false
,
showPassword
:
false
,
waiting
:
false
waiting
:
false
};
};
...
@@ -264,7 +265,7 @@ module.exports = {
...
@@ -264,7 +265,7 @@ module.exports = {
validations=
{
{
validations=
{
{
minLength
:
6
,
minLength
:
6
,
notEquals
:
'
password
'
,
notEquals
:
'
password
'
,
notEquals
Field
:
'
user.username
'
notEquals
Username
:
this
.
props
.
username
}
}
}
}
validationErrors=
{
{
validationErrors=
{
{
minLength
:
formatMessage
({
minLength
:
formatMessage
({
...
@@ -273,7 +274,7 @@ module.exports = {
...
@@ -273,7 +274,7 @@ module.exports = {
notEquals
:
formatMessage
({
notEquals
:
formatMessage
({
id
:
'
registration.validationPasswordNotEquals
'
id
:
'
registration.validationPasswordNotEquals
'
}),
}),
notEquals
Field
:
formatMessage
({
notEquals
Username
:
formatMessage
({
id
:
'
registration.validationPasswordNotUsername
'
id
:
'
registration.validationPasswordNotUsername
'
})
})
}
}
}
}
...
...
src/main.scss
View file @
59d55811
...
@@ -164,7 +164,7 @@ dl {
...
@@ -164,7 +164,7 @@ dl {
dt
{
dt
{
font-weight
:
700
;
font-weight
:
700
;
}
}
dd
{
dd
{
margin
:
0
;
margin
:
0
;
}
}
...
...
src/views/studentcompleteregistration/studentcompleteregistration.jsx
View file @
59d55811
...
@@ -132,7 +132,8 @@ var StudentCompleteRegistration = intl.injectIntl(React.createClass({
...
@@ -132,7 +132,8 @@ var StudentCompleteRegistration = intl.injectIntl(React.createClass({
{
this
.
props
.
must_reset_password
?
{
this
.
props
.
must_reset_password
?
<
Steps
.
ChoosePasswordStep
onNextStep=
{
this
.
advanceStep
}
<
Steps
.
ChoosePasswordStep
onNextStep=
{
this
.
advanceStep
}
showPassword=
{
true
}
showPassword=
{
true
}
waiting=
{
this
.
state
.
waiting
}
/>
waiting=
{
this
.
state
.
waiting
}
username=
{
this
.
props
.
studentUsername
}
/>
:
:
[]
[]
}
}
...
...
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