1ACC.changepassword = { 2 3 _autoload: [ 4 "bindFormAction", 5 "bindMobileFormControl" 6 ], 7 bindFormAction: function () { 8 $("#updatePwd").on("click", function(t) { 9 var currentPwd = $("#currentPassword").val(); 10 var newPassword = $("#newPassword").val(); 11 var checkNewPwd = $("#checkNewPassword").val(); 12 var hasError = false; 13 14 $('.error').addClass('hidden'); 15 // validation for current password 16 if(!currentPwd){ 17 $("#currentPassword").closest('.form-input-section').find('.validation-field').show(); 18 $("#currentPassword").attr('style', 'border-bottom:1px solid #D0112B !important'); 19 hasError = true; 20 } else { 21 $("#currentPassword").closest('.form-input-section').find('.validation').hide(); 22 $("#currentPassword").attr('style', 'border-bottom:1px solid #222222 !important'); 23 } 24 25 // validation for new password 26 if(!newPassword){ 27 $("#newPassword").closest('.form-input-section').find('.validation-field').show(); 28 $("#newPassword").attr('style', 'border-bottom:1px solid #D0112B !important'); 29 hasError = true; 30 } else { 31 $("#newPassword").closest('.form-input-section').find('.validation').hide(); 32 $("#newPassword").attr('style', 'border-bottom:1px solid #222222 !important'); 33 } 34 35 // validation for retyped password 36 if(!checkNewPwd){ 37 $("#checkNewPassword").closest('.form-input-section').find('.validation-field').show(); 38 $("#checkNewPassword").attr('style', 'border-bottom:1px solid #D0112B !important'); 39 hasError = true; 40 } else { 41 $("#checkNewPassword").closest('.form-input-section').find('.validation').hide(); 42 $("#checkNewPassword").attr('style', 'border-bottom:1px solid #222222 !important'); 43 } 44 45 46 47 return !hasError; 48 }); 49 }, 50 51 bindMobileFormControl: function() { 52 53 $('.change-password .form-group input').on('focusout', function(){ 54 if (!$(this).val().length) { 55 $(this).parents('.form-group').removeClass('active-form'); 56 } 57 }); 58 59 $('.change-password .form-group input').on('focusin', function(){ 60 $(this).parents('.form-group').addClass('active-form').removeClass('position-relative'); 61 $(this).css('border-bottom',' 1px solid #222222'); 62 }); 63 } 64 }; 65 66 $(document).ready(function () 67 { 68 if($(window).width() < 992) { 69 setTimeout(() => { 70 // for saved password - need to enable floating label and changes border color 71 if($(".change-password .form-group #currentPassword:-webkit-autofill").length > 0) { 72 $('.change-password .form-group #currentPassword').parents('.form-group').addClass('active-form').removeClass('position-relative'); 73 $(this).css('border-bottom',' 1px solid #222222'); 74 } 75 }, 500); 76 } 77 });
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.