$(document).ready(function(){if($(".FieldtypePassword[autocomplete='off']").length){setTimeout(function(){$(".FieldtypePassword[autocomplete='off']").attr("value","").closest(".Inputfield").removeClass("InputfieldStateChanged")},1e3)}$("form#ProcessProfile").on("submit",function(){var $form=$(this);var $inputfields=$(".InputfieldStateChanged.InputfieldPassRequired");if(!$inputfields.length)return;var $pass=$("#_old_pass");if($pass.val().length)return;var pwAlert=ProcessWire.config.ProcessProfile.passRequiredAlert;if(pwAlert.length&&typeof vex!="undefined"){vex.dialog.open({message:pwAlert,input:"",callback:function(data){if(!data)return;var val=$("#_old_pass_confirm").val();if(val.length){$pass.val(val);setTimeout(function(){$("#submit_save_profile").trigger("click")},200)}}})}else{var $passWrap=$pass.closest(".InputfieldPassword");if($passWrap.hasClass("InputfieldStateCollapsed")){setTimeout(function(){$passWrap.find(".InputfieldHeader").trigger("click")},200)}setTimeout(function(){$pass.trigger("focus")},400)}return false})});