Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dida Adams Arizona
Tia-dev
Commits
9856ee98
Commit
9856ee98
authored
Aug 24, 2020
by
a.bairuha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ef8c2ffd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
ForgotPassword.js
src/container/ForgotPassword.js
+2
-2
Login.js
src/container/Login.js
+4
-4
ResetPassword.js
src/container/ResetPassword.js
+12
-12
No files found.
src/container/ForgotPassword.js
View file @
9856ee98
...
...
@@ -39,9 +39,9 @@ class ForgotPassword extends Component {
var
isEmail
=
this
.
isEmail
(
this
.
state
.
email
)
if
(
this
.
state
.
email
.
trim
()
==
""
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email
cannot be empty!
'
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email
is required.
'
})
}
else
if
(
!
isEmail
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email format is not correct
!
'
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email format is not correct
.
'
})
}
else
{
this
.
verification
()
}
...
...
src/container/Login.js
View file @
9856ee98
...
...
@@ -65,11 +65,11 @@ class Login extends Component {
validateLogin
()
{
var
isEmail
=
this
.
isEmail
(
this
.
state
.
email
)
if
(
this
.
state
.
email
.
trim
()
==
""
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email
cannot be empty!
'
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email
is required.
'
})
}
else
if
(
!
isEmail
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email format is not correct
!
'
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email format is not correct
.
'
})
}
else
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
cannot be empty!
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
is required.
'
})
}
else
{
this
.
login
()
}
...
...
@@ -102,7 +102,7 @@ class Login extends Component {
}
this
.
props
.
history
.
push
(
'/home/beranda'
)
}
else
{
if
(
response
.
data
.
message
==
'Incorrect
P
assword.'
)
{
if
(
response
.
data
.
message
==
'Incorrect
p
assword.'
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
response
.
data
.
message
})
}
else
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
response
.
data
.
message
})
...
...
src/container/ResetPassword.js
View file @
9856ee98
...
...
@@ -20,8 +20,8 @@ class ResetPassword extends Component {
showPass2
:
false
,
errorPassword
:
false
,
errorConfirmPassword
:
false
,
msgPassword
:
'Consists of 8 characters with a combination of numbers
!
.'
,
msgConfirmPassword
:
'Consists of 8 characters with a combination of numbers
!
.'
,
msgPassword
:
'Consists of 8 characters with a combination of numbers.'
,
msgConfirmPassword
:
'Consists of 8 characters with a combination of numbers.'
,
userId
:
0
,
alert
:
false
,
tipeAlert
:
''
,
...
...
@@ -33,7 +33,7 @@ class ResetPassword extends Component {
console
.
log
(
this
.
props
.
match
.
params
.
id
)
let
userId
=
this
.
props
.
match
.
params
.
id
this
.
setState
({
userId
})
this
.
checkExpiredLink
(
userId
)
//
this.checkExpiredLink(userId)
// console.log(this.props)
}
...
...
@@ -65,23 +65,23 @@ class ResetPassword extends Component {
validateReset
()
{
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
cannot be empty!
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
is required
'
})
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
minimum 8 characters!
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
of at least 8 characters.
'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password format should not use email
!
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password format should not use email
.
'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password must be a combination of characters, letters and numbers
!
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password must be a combination of characters, letters and numbers
.
'
})
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Confirm password
cannot be empty!
'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Confirm password
is required.
'
})
}
else
if
(
this
.
state
.
confirmPassword
.
length
<
8
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Confirm password of at least 8 characters
!
'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Confirm password of at least 8 characters
.
'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
confirmPassword
))
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation format
may not use email!
'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation format
should not use email.
'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
confirmPassword
))
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation must be a combination of characters, letters and numbers
!
'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation must be a combination of characters, letters and numbers
.
'
})
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Confirmation password must match the password
!
'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Confirmation password must match the password
.
'
})
}
else
{
this
.
confirmPassword
()
}
...
...
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