praiadeseselle/wire/modules/Process/ProcessProfile/ProcessProfile.min.js

1 line
1,004 B
JavaScript
Raw Permalink Normal View History

2022-03-08 15:55:41 +01:00
$(document).ready(function(){if($(".FieldtypePassword[autocomplete='off']").length){setTimeout(function(){$(".FieldtypePassword[autocomplete='off']").attr("value","").closest(".Inputfield").removeClass("InputfieldStateChanged")},1000)}$("form#ProcessProfile").submit(function(){var b=$(this);var c=$(".InputfieldStateChanged.InputfieldPassRequired");if(!c.length){return}var a=$("#_old_pass");if(a.val().length){return}var d=ProcessWire.config.ProcessProfile.passRequiredAlert;if(d.length&&typeof vex!="undefined"){vex.dialog.open({message:d,input:"<input type='password' placeholder='"+a.attr("placeholder")+"' id='_old_pass_confirm' />",callback:function(f){if(!f){return}var g=$("#_old_pass_confirm").val();if(g.length){a.val(g);setTimeout(function(){$("#submit_save_profile").click()},200)}}})}else{var e=a.closest(".InputfieldPassword");if(e.hasClass("InputfieldStateCollapsed")){setTimeout(function(){e.find(".InputfieldHeader").click()},200)}setTimeout(function(){a.focus()},400)}return false})});