| 12345 |
- var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{jsFiles(){return["tenants/themes/compact/index.mobil_anonymous.js","platform/membership/managers/accountmanager.js","libs/passwordrequirement/passwordrequirement.js"]}cssFiles(){return["libs/passwordrequirement/passwordrequirement.css"]}html(){if(jQuery("#external-form").length===0){var i=new t.Index_Mobil_Anonymous;i.init(null)}let n="";return n+=$(window).width()>1200?`<div class="row h-100"> <div class="col-xl-5"><div class="banner-img-container h-100"><img src="tenants/themes/compact/imgs/mobil-desktop-view-bg.png" alt="img" class="h-100 w-100"> </div> </div> <div class="col-xl-7 desktop-view"> <form class="mt-100" id="frm_RegisterUser" default="" data-validate="parsley" data-isdynamic="false"> <div id="div_ValidationSummary"></div> <div id="div_RegisterUser"><h1 class="display-4 mb-30 text-dark-100 text-center">Registration</h1>
- <div class="alert alert-primary d-none">We will send new code to your <a href=""><u>Email or Phone</u></a> to create your password.</div> <div class="form-group"><input class="form-control" required placeholder="Enter Registered Phone Number" id="txt_EmailorPhone" type="text"></div> <div class="form-group floating-label-form-group floating-label-form-group-with-value focus" id="div_TenantsAutoComplete"><select id="ddl_Tenant" class=" form-control value-control" data-isdynamic="false"></select></div><button class="btn text-white btn-block" type="button" id="btn_SendOtp" style="background:#001F5D;">Confirm</button><p class="text-right mt-20"><a href="Index.html#/login">Back to login</a></p></div> <div id="div_CreatePswd" class="d-none"> <h1 class="display-5 mb-30 text-center">Create your Password</h1>
- <div class="form-group"><label class="form-control" id="lbl_Email"></label></div><div class="form-group"><input class="form-control pr-password " required id="txt_NewPswd" placeholder="New password" type="password"><span toggle="#txt_NewPswd" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
- <div class="showpwsdreq"></div> </div> <div class="form-group"><input class="form-control" required id="txt_ConfirmPswd" placeholder="Re-enter new password" type="password" autocomplete="new-password"><span toggle="#txt_ConfirmPswd" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div>
- <button class="btn text-white btn-block mb-20" disabled="disabled" type="button" id="btn_CreatePswd" style="background:#001F5D;">Create Password</button> <div class="input-group mb-20"><div class="custom-control custom-checkbox col-xs"><input class="custom-control-input" id="InputTermsandConditions" type="checkbox"><label class="custom-control-label font-14" for="InputTermsandConditions">I accept the terms & conditions</label></div></div><p class="text-right"><a href="Index.html#/login">Back to login</a></p></div> <div id="div_SuccessMsg" class="d-none"> <div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div> <h1 class="display-4 mb-20 text-center">Password Created Successfully</h1> <p class="text-center"><a href="Index.html#/login">Click here to Login</a></p> </div></form> </div></div>`:`<div><form id="frm_RegisterUser" default="" class="p-4 " data-validate="parsley" data-isdynamic="false" style="background: url(tenants/themes/compact/imgs/mobil-background.png) no-repeat;"><div id="div_ValidationSummary" class="position-fixed w-85"></div><div id="div_RegisterUser"> <div class="d-flex flex-column justify-content-around p-3 mt-4" style="height:100vh"> <div class="form-group-body"> <div class=" mx-auto mb-20"><h1 class="display-4 mb-60 text-white text-center font-weight-bold">Registration</h1></div> <div class="alert alert-primary d-none">We will send new code to your <a href=""><u>Email or Phone</u></a> to create your password.</div><div class="form-group mb-20"><input class="form-control" required autocomplete="off" placeholder="Enter Registered Email or Phone" id="txt_EmailorPhone" type="text"></div><div class="form-group floating-label-form-group floating-label-form-group-with-value focus" id="div_TenantsAutoComplete"><select id="ddl_Tenant" class="form-control value-control" data-isdynamic="false"></select></div> <p class="text-right "><a href="Index.html#/login" class="text-white">Back to login</a></p> </div> <div class="footer-register"><button class="btn btn-block rounded-10 text-white" type="button" style="background:#001F5D; padding: 10px !important;" id="btn_SendOtp">Confirm</button> </div> </div></div><div id="div_CreatePswd" class="d-none"><div class="d-flex flex-column justify-content-around" style="height: 100vh"> <div class="form-group"> <h1 class="display-5 text-white my-50 font-weight-bold text-center">Create your Password</h1><div class="form-group"><input class="form-control pr-password" required id="txt_NewPswd" placeholder="New password" type="password" autocomplete="new-password"><span toggle="#txt_NewPswd" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span> <div class="showpwsdreq"></div></div> <div class="form-group"><input class="form-control" required id="txt_ConfirmPswd" placeholder="Re-enter new password" type="password" autocomplete="new-password"><span toggle="#txt_ConfirmPswd" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div></div> <div class="form-footer"> <button class="btn btn-primary btn-block mb-20 rounded-10" type="button" id="btn_CreatePswd" style="background:#001F5D; padding: 10px !important;">Create Password</button> </div> </div></div> <div id="div_SuccessMsg" class="d-none"> <div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div> <h1 class="display-4 mb-20 text-center">Password Created Successfully</h1> <p class="text-center"><a href="Index.html#/login">Click here to Login</a></p></div></form></div>`,n+`<div id="modal_Otp" class="modal fade hide"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header mt-2 mb-2"> <h5 class="modal-title pull-left">Mobile or Email Verification</h5><button type="button" class="btn btn-primary btn-simple pull-right" data-dismiss="modal" aria-hidden="true">×</button></div> <div class="modal-body" id="div_modalbody"> <div class="mb-10"> <p class="lbl_Otp">We have sent OTP on your Mobile Number and Email!</p> </div> <div class="floating-label-form-group mb-2"><input class="form-control" id="txt_Otp" placeholder="Enter Mobile OTP/Email OTP" type="password" autocomplete="new-password"><span toggle="#txt_Otp" id="OtpHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div> </div> <div class="modal-footer mb-2" style="display:block"><button type="button" class="btn btn-primary pull-left" id="btn_ResendOtp">Resend</button><button type="button" class="btn btn-primary pull-right" id="btn_VerifyOtp">Verify</button></div> </div></div></div>`}load(t,i,r){this._accountManager=n.Platform.Membership.Managers.AccountManager.Instance();this.loadTenants();jQuery(".preloader-it").delay(500).fadeOut("slow");jQuery("#external-container").delay(500).fadeIn("slow");jQuery("#bizgaze_body").css("background-color","#f4f6f7");$("#div_modalbody").removeAttr("style");$(".pr-password").click(function(){var n=$(".pr-password");n.passwordRequirements({numCharacters:8,useLowercase:!0,useUppercase:!0,useNumbers:!0,useSpecial:!0})});$("#passwordHide").click(function(){var n=$("#txt_NewPswd");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#passwordHide").toggleClass("fa-eye-slash fa-eye")});$("#confirmPasswordHide").click(function(){var n=$("#txt_ConfirmPswd");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#confirmPasswordHide").toggleClass("fa-eye-slash fa-eye")});$("#OtpHide").click(function(){var n=$("#txt_Otp");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#OtpHide").toggleClass("fa-eye-slash fa-eye")});$("#txt_EmailorPhone").keypress(function(n){n.which==13&&document.getElementById("btn_SendOtp").click()});$("#txt_Otp").keypress(function(n){n.which==13&&document.getElementById("btn_VerifyOtp").click()});$("#txt_NewPswd,#txt_ConfirmPswd").keypress(function(n){n.which==13&&document.getElementById("btn_CreatePswd").click()});var u=this;$("#btn_SendOtp").click(function(){u.validate()});$(".btn_SendOtp").click(function(){u.validate()});$("#btn_CreatePswd").click(function(){u.createPassword()});$("#btn_VerifyOtp").click(function(){u.verifyOtp()});$("#btn_ResendOtp").click(function(){u.sendOtp(u.OtpId)});r!=null&&r()}loadTenants(){var n=this;n._accountManager.getTenants().then(function(n){var r=n,t,f;let e=document.getElementById("ddl_Tenant");for($("#ddl_Tenant").empty(),$("#ddl_Tenant").append("<option value=0>Select Tenant<\/option>"),t=0;t<n.result.length;t++){var u=n.result[t],i=document.createElement("option"),o=u.tenantName,s=u.tenantId;i.text=o;i.value=s;e.append(i)}r.result.filter(n=>n.isTemplateDb==!1).length==1&&(f=$("#ddl_Tenant option[value="+r.result.filter(n=>n.isTemplateDb==!1)[0].tenantId+"]"),f.attr("selected",!0),$("#ddl_Tenant").prop("disabled",!0))})}validate(){var t,i,n;if($(".lbl_Otp").text(""),$("#txt_Otp").val(""),$("#div_ValidationSummary").empty(),t=$("#txt_EmailorPhone").val(),i=$("#ddl_Tenant option:selected").val(),t==""&&i==0)return MessageHelper.Instance().showError("Please enter Email/Phone and select a Tenant !","div_ValidationSummary"),!1;if(t=="")return MessageHelper.Instance().showError("Email or Phone cannot be Empty!","div_ValidationSummary"),!1;if(i==0)return MessageHelper.Instance().showError("Please select a Tenant","div_ValidationSummary"),!1;n=this;n._accountManager.getContact(t,i).then(function(t){t.result!=null?(n.Email=t.result.emailAddress,n.ContactNumber=t.result.phoneNumber,n.UserName=t.result.unibaseId,n.TenantId=t.result.tenantId,n.ContactName=t.result.userName,$(".lbl_Otp").removeClass("text-danger text-success").text("We have sent OTP on your Mobile Number and Email !"),$("#txt_Otp").val(""),$("#div_ValidationSummary").empty(),n.sendOtp(0)):MessageHelper.Instance().showError(t.message,"div_ValidationSummary")})}sendOtp(n){var t=this,i;$(".preloader-it").fadeIn();i={ContactOrEmail:$("#txt_EmailorPhone").val(),FirstName:t.ContactName,LastName:"",ContactNumber:"",Email:"",TenantName:"",IsSignup:!1,IsForgotPswd:!1,IsRegisterUser:!0,UnibaseId:t.UserName,OtpId:n,UserOtp:""};t._accountManager.sendOtp(i).then(function(i){n!=0&&$(".lbl_Otp").text("OTP has been Resent!").removeClass("text-danger","").addClass("text-success","");i==0?($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")):(t.OtpId=i,$("#modal_Otp").modal("show"),$(".preloader-it").delay(200).fadeOut("slow"))},function(){$(".preloader-it").delay(200).fadeOut("slow");MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")})}verifyOtp(){var n=this,t;$("#txt_Otp").val()==""?$(".lbl_Otp").text("Please Enter OTP!").addClass("text-danger",""):(t={FirstName:"",LastName:"",ContactNumber:"",Email:"",TenantName:"",ContactOrEmail:"",IsForgotPswd:!1,IsRegisterUser:!1,IsSignup:!0,UnibaseId:"",OtpId:n.OtpId,UserOtp:$("#txt_Otp").val()},n._accountManager.verifyOtp(t).then(function(n){n.code.toString()=="2"?($(".preloader-it").delay(200).fadeOut("slow"),$(".lbl_Otp").text("Otp Expired, Please click on Resend to get new OTP").addClass("text-danger",""),$("#txt_Otp").val("")):n.result!=null&&(n.result.contactConfirmed==!1&&n.result.emailConfirmed==!1?($(".preloader-it").delay(200).fadeOut("slow"),$(".lbl_Otp").text("Invalid OTP!").addClass("text-danger",""),$("#txt_Otp").text("")):($(".preloader-it").fadeIn(),$("#div_RegisterUser").addClass("d-none"),$("#modal_Otp").modal("hide"),$(".preloader-it").delay(200).fadeOut("slow"),$("#lbl_Email").text($("#txt_EmailorPhone").val()),$("#div_CreatePswd").removeClass("d-none")))}))}createPassword(){var t=this,i,n,r;if($("#div_ValidationSummary").empty(),i=$("#txt_ConfirmPswd").val(),n=$("#txt_NewPswd").val(),n.length==0||i.length==0)return MessageHelper.Instance().showError("Password fields cannot be empty!","div_ValidationSummary"),!1;if(n.length<8||i.length<8)return MessageHelper.Instance().showError("Password must be atleast 8 characters!","div_ValidationSummary"),!1;if(n!=i)return MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!","div_ValidationSummary"),!1;var n=n,u=n.match(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/)?!0:!1;if(u==!1)return $(".pr-password").focus(),MessageHelper.Instance().showError("Please Match the Password in requested Format","div_ValidationSummary"),!1;r={Password:$("#txt_NewPswd").val(),UserName:t.UserName,Email:t.Email,ContactNumber:t.ContactNumber,TenantId:t.TenantId};t._accountManager.registerUser(r).then(function(n){n.errors==null?($("#div_CreatePswd").addClass("d-none"),$("#div_SuccessMsg").removeClass("d-none"),MessageHelper.Instance().showSuccess("Password Created Successfully","div_ValidationSummary")):($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError(n.errors[0],"div_ValidationSummary"))})}submit(){}static Instance(){return new i}}t.MobilNewRegisterUser=i})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|