Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
28fe54f1
Commit
28fe54f1
authored
Jun 27, 2022
by
Rosanny Sihombing
Browse files
clean codes
parent
9b0bffa7
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
public/js/security.js
View file @
28fe54f1
// check password and password confirmation input fields
// used in Security and Reset Password
$
(
'
#inputNewPwd, #inputConfirm
'
).
on
(
'
keyup
'
,
function
()
{
var
isBest
,
isMatch
;
let
isBest
,
isMatch
isBest
=
checkPasswordReq
(
$
(
'
#inputNewPwd
'
).
val
())
$
(
'
#recommendation
'
).
empty
()
;
if
(
!
isBest
)
{
//$('#recommendation').html('Must be at least 8 characters').css('color', 'red');
$
(
'
#recommendation
'
).
html
(
'
Das Passwort muss mindestens 8 Zeichen haben
'
).
css
(
'
color
'
,
'
red
'
)
;
}
isBest
=
checkPasswordReq
(
$
(
'
#inputNewPwd
'
).
val
())
$
(
'
#recommendation
'
).
empty
()
if
(
!
isBest
)
{
//
$('#recommendation').html('Must be at least 8 characters').css('color', 'red');
$
(
'
#recommendation
'
).
html
(
'
Das Passwort muss mindestens 8 Zeichen haben
'
).
css
(
'
color
'
,
'
red
'
)
}
// match or not?
if
(
$
(
'
#inputNewPwd
'
).
val
()
==
$
(
'
#inputConfirm
'
).
val
())
{
//$('#message').html('Matching').css('color', 'green');
$
(
'
#message
'
).
html
(
'
Übereinstimmend
'
).
css
(
'
color
'
,
'
green
'
);
isMatch
=
true
;
}
else
{
//$('#message').html('Not Matching').css('color', 'red');
$
(
'
#message
'
).
html
(
'
Nicht übereinstimmend
'
).
css
(
'
color
'
,
'
red
'
);
isMatch
=
false
;
}
// enable/disable update button
if
(
isBest
&&
isMatch
)
{
$
(
'
#updateBtn
'
).
prop
(
'
disabled
'
,
false
);
}
else
{
$
(
'
#updateBtn
'
).
prop
(
'
disabled
'
,
true
);
}
});
\ No newline at end of file
// match or not?
if
(
$
(
'
#inputNewPwd
'
).
val
()
==
$
(
'
#inputConfirm
'
).
val
())
{
// $('#message').html('Matching').css('color', 'green');
$
(
'
#message
'
).
html
(
'
Übereinstimmend
'
).
css
(
'
color
'
,
'
green
'
)
isMatch
=
true
}
else
{
// $('#message').html('Not Matching').css('color', 'red');
$
(
'
#message
'
).
html
(
'
Nicht übereinstimmend
'
).
css
(
'
color
'
,
'
red
'
)
isMatch
=
false
}
// enable/disable update button
if
(
isBest
&&
isMatch
)
{
$
(
'
#updateBtn
'
).
prop
(
'
disabled
'
,
false
)
}
else
{
$
(
'
#updateBtn
'
).
prop
(
'
disabled
'
,
true
)
}
})
routes/account.ts
View file @
28fe54f1
This diff is collapsed.
Click to expand it.
routes/public.ts
View file @
28fe54f1
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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