Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
c9d55d7b
Commit
c9d55d7b
authored
5 years ago
by
Wolfgang Knopki
Browse files
Options
Download
Email Patches
Plain Diff
reset script
parent
eaf5ed7c
master
MLAB-677
devel
devel_wolfgang
patch-1
reset-jul13
reset-merge
test_logoutbutton
testing
1 merge request
!2
Mlab 56
Pipeline
#376
passed with stage
in 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
views/reset.pug
+29
-16
views/reset.pug
with
29 additions
and
16 deletions
+29
-16
views/reset.pug
+
29
-
16
View file @
c9d55d7b
...
@@ -59,19 +59,32 @@ html(lang="en")
...
@@ -59,19 +59,32 @@ html(lang="en")
script(src="/account/js/generalFunction.js")
script(src="/account/js/generalFunction.js")
script(src="/js/headfoot.js")
script(src="/js/headfoot.js")
script.
script.
// check input fields
$('#inputNewPwd, #inputConfirm').on('keyup', function () {
'use strict';
var isBest = false;
window.addEventListener('load', function() {
var isMatch = false;
// Fetch all the forms we want to apply custom Bootstrap validation styles to
var forms = document.getElementsByClassName('needs-validation');
// password best practice
// Loop over them and prevent submission
if ($('#inputNewPwd').val().length < 8) {
var validation = Array.prototype.filter.call(forms, function(form) {
$('#recommendation').html('Must be at least 8 characters').css('color', 'red');
form.addEventListener('submit', function(event) {
isBest = false;
if (form.checkValidity() === false) {
} else {
event.preventDefault();
$('#recommendation').html('').css('color', 'red');
event.stopPropagation();
isBest = true;
}
}
form.classList.add('was-validated');
// match or not?
}, false);
if ($('#inputNewPwd').val() == $('#inputConfirm').val()) {
});
$('#message').html('Matching').css('color', 'green');
}, false);
isMatch = true;
} else {
$('#message').html('Not Matching').css('color', 'red');
isMatch = false;
}
// enable/disable update button
if (isBest && isMatch) {
$('#updateBtn').prop('disabled', false);
} else {
$('#updateBtn').prop('disabled', true);
}
});
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets