Commit d8677b69 by Nilu

applicant portal signin autofill issue fixed

parent 64853d51
...@@ -19,10 +19,12 @@ ...@@ -19,10 +19,12 @@
Debug.assertion(job != null, "Job is null in applicant portal"); Debug.assertion(job != null, "Job is null in applicant portal");
%> %>
<script type="text/javascript"> <script type="text/javascript">
var interval;
$(document.body).addClass('bg-color'); $(document.body).addClass('bg-color');
$(document).ready(function() { $(document).ready(function() {
recalcFunction = setupRecalc ($("form"), {'recalcOnError':true}); recalcFunction = setupRecalc ($("form"), {'recalcOnError':true});
interval = setInterval(function() { validate(); }, 500);
$('#applyJob').on('keyup keypress', function(e) { $('#applyJob').on('keyup keypress', function(e) {
var keyCode = e.keyCode || e.which; var keyCode = e.keyCode || e.which;
...@@ -31,7 +33,6 @@ ...@@ -31,7 +33,6 @@
return false; return false;
} }
}); });
validate(); validate();
$('input[type="password"]').keyup(function() { $('input[type="password"]').keyup(function() {
...@@ -44,10 +45,20 @@ ...@@ -44,10 +45,20 @@
}); });
function validate() { function validate() {
if($('input[type="password"]').val() != '') { var empty = false;
$('.sign-in-btn').removeAttr('disabled'); $('input[type="password"]').each(function() {
} else { if ($( this ).val() == '') {
empty = true;
if ($( this ).css('background-color') == 'rgb(250, 255, 189)') {
empty = false;
}
}
});
if (empty) {
$('.sign-in-btn').attr('disabled', 'disabled'); $('.sign-in-btn').attr('disabled', 'disabled');
} else {
$('.sign-in-btn').removeAttr('disabled');
clearInterval(interval);
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment