1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-09-19 23:21:47 +02:00
polr/fpass.js
2014-11-08 15:27:14 -05:00

16 lines
672 B
JavaScript

$(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
}
});