Sha256: b971e60feaea2ef99c4f5f895cf9913f88a9ad887103969a480aa7af3f4acc87
Contents?: true
Size: 1.37 KB
Versions: 11
Compression:
Stored size: 1.37 KB
Contents
"use strict";var KTAuthResetPassword=function(){var t,e,i;return{init:function(){t=document.querySelector("#kt_password_reset_form"),e=document.querySelector("#kt_password_reset_submit"),i=FormValidation.formValidation(t,{fields:{email:{validators:{regexp:{regexp:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,message:"The value is not a valid email address"},notEmpty:{message:"Email address is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap5({rowSelector:".fv-row",eleInvalidClass:"",eleValidClass:""})}}),e.addEventListener("click",(function(r){r.preventDefault(),i.validate().then((function(i){"Valid"==i?(e.setAttribute("data-kt-indicator","on"),e.disabled=!0,setTimeout((function(){e.removeAttribute("data-kt-indicator"),e.disabled=!1,Swal.fire({text:"We have send a password reset link to your email.",icon:"success",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn btn-primary"}}).then((function(e){if(e.isConfirmed){t.querySelector('[name="email"]').value="";var i=t.getAttribute("data-kt-redirect-url");i&&(location.href=i)}}))}),1500)):Swal.fire({text:"Sorry, looks like there are some errors detected, please try again.",icon:"error",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn btn-primary"}})}))}))}}}();KTUtil.onDOMContentLoaded((function(){KTAuthResetPassword.init()}));
Version data entries
11 entries across 5 versions & 1 rubygems