"use strict";(self.webpackChunkiride=self.webpackChunkiride||[]).push([[4535],{95670:(e,o,r)=>{r.d(o,{Z:()=>t});const t={passwordEvents:function(){$("#togglePasswordLink").on("click",(function(e){e.preventDefault(),"text"===$("#password").attr("type")?($("#password").attr("type","password"),$("#togglePassword").addClass("fa-eye-slash"),$("#togglePassword").removeClass("fa-eye")):"password"===$("#password").attr("type")&&($("#password").attr("type","text"),$("#togglePassword").removeClass("fa-eye-slash"),$("#togglePassword").addClass("fa-eye"))}))},loginSubmit:function(e){e&&"function"==typeof e.onBeforeSubmit&&e.onBeforeSubmit();var o=this;$("#login").click((function(){$.ajax({url:"ajax.php?object=IWUser&tipoview=login&JSON",type:"post",data:$("#form").serialize(),dataType:"json",success:function(r){o.loginOnAjaxSuccess({json:r,opts:e})}})}))},loginOnAjaxSuccess:function(e){var o=e.json;if(e.opts&&"function"==typeof e.opts.onSuccessCallback&&e.opts.onSuccessCallback(o),o.ret){var r=o.pagedefault;o.url&&(r=o.url),r=r?"index.php?"+r:document.location.href,strpos(r,"?")>0?r+="&__sck__=1":r+="?__sck__=1",window.location.href=r}else alert("Credenziali errate: ritentare

Invalid Username or password: try again")},openModalRecuperoPwd:function(){var e=this;$("#lost-password-link").on("click",(function(){$("#recupero-pwd-button").show(),$("#recupero_pwd_username").val(""),$("#recupero-pwd-button .spinner-border, .loading-recupero-pwd").hide(),$("#span-recupero-pwd-button").show();var o=$("#recupero-pwd-button");o.prop("disabled",!1),o.off(),o.on("click",(function(){e.getEmailRecuperoPassword()})),o.show(),$("#recupero-pwd-output-actions .output-actions").html(""),$("#recupero-pwd-output-actions").hide(),$("#popup-recupero-pwd").modal("show")}))},getEmailRecuperoPassword:function(){var e=$("#recupero-pwd-form")[0],o=e.checkValidity();if(e.classList.add("was-validated"),o){$("#span-recupero-pwd-button").hide(),$("#recupero-pwd-button .spinner-border, .loading-recupero-pwd").show();var r=this,t=$("#recupero_pwd_company").val(),a=$("#recupero_pwd_username").val();$.ajax({url:"/recupero-password",type:"post",dataType:"json",data:{tipoview:"getEmailRecuperoPwd",company:t,username:a},success:function(e){$("#recupero-pwd-output-actions .output-actions").html(e.data.msg),$("#recupero-pwd-output-actions").show();var o=$("#recupero-pwd-button");if(!e.data.ret)return o.prop("disabled",!0),void o.hide();$("#recupero-pwd-button .spinner-border, .loading-recupero-pwd").hide(),$("#span-recupero-pwd-button").show(),o.show(),o.off(),o.on("click",(function(){r.sendEmailRecuperoPassword(t,a)}))}})}},sendEmailRecuperoPassword:function(e,o){$("#span-recupero-pwd-button").hide(),$("#recupero-pwd-button .spinner-border, .loading-recupero-pwd").show(),$.ajax({url:"/recupero-password",type:"post",dataType:"json",data:{tipoview:"sendEmailRecuperoPwd",company:e,username:o},success:function(e){$("#recupero-pwd-output-actions .output-actions").html(e.data.msg?e.data.msg:e.data.out),$("#recupero-pwd-output-actions").show(),e.msg?($("#recupero-pwd-button .spinner-border, .loading-recupero-pwd").hide(),$("#span-recupero-pwd-button").show()):$("#recupero-pwd-button").hide()}})},checkEmailRecuperoPwd:function(){var e=this;getHtmlFromAjax({url:"ajax.php?JSON",divname:"dialog_recupero_password",data:{object:"IWUser",tipoview:"viewDialogSetEmailForPwdReset"},onSuccess:function(){dialogShow("dialog_recupero_password",(function(o){o&&$.ajax({url:"view.php",dataType:"json",type:"post",data:{OP_FROM_AJAX:1,JSON:1,object:"IWUser",tipoview:"saveEmailRecuperoPwd",email:$("#email_for_pwd_reset").val()},success:function(o){ajaxSubmitOnSuccessFunction(o,!0),o.ret||e.checkEmailRecuperoPwd()}})}))}})}}},30206:(e,o,r)=>{r(41517);var t=r(95670);$(document).ready((function(){t.Z.passwordEvents(),t.Z.loginSubmit(),t.Z.openModalRecuperoPwd(),resizeContent(),$(window).bind("resize",resizeContent)}))},96004:(e,o,r)=>{var t=r(68844);e.exports=t([].slice)},86761:(e,o,r)=>{var t=r(68844),a=r(10509),s=r(48999),n=r(36812),p=r(96004),u=r(97215),i=Function,c=t([].concat),d=t([].join),w={};e.exports=u?i.bind:function(e){var o=a(this),r=o.prototype,t=p(arguments,1),u=function(){var r=c(t,p(arguments));return this instanceof u?function(e,o,r){if(!n(w,o)){for(var t=[],a=0;a{var t=r(79989),a=r(86761);t({target:"Function",proto:!0,forced:Function.bind!==a},{bind:a})}},e=>{e.O(0,[9989],(()=>{return o=30206,e(e.s=o);var o}));e.O()}]);