1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-09-20 07:31:53 +02:00
polr/fpass.js

16 lines
672 B
JavaScript
Raw Normal View History

2014-11-08 21:27:14 +01:00
$(document).ready(function() {
$("#submit").prop('disabled', true);
});
$('#rnpass').change(function() {
if ($('#rnpass').val() == $('#npass').val()) {
$('#warn').html('<div style=\'width: 450px; text-align: center; margin:0 auto;\' class="alert alert-success">Woo, the passwords match!</div>');
$("#submit").prop('disabled', false); // show submit button
}
if ($('#rnpass').val() != $('#npass').val()) {
$('#warn').html('<div style=\'width: 450px; text-align: center; margin:0 auto;\' class="alert alert-danger">Those passwords don\'t match :(</div>');
$("#submit").prop('disabled', true); // hide submit button
}
});