PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 3.3.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v3.3.1
3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 All 138 releases
bit-form / assets / bf-762-200.js

bf-762-200.js in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 3.3.1, at assets/bf-762-200.js

2 lines 6.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var U=Object.defineProperty,q=Object.defineProperties;var J=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var T=(l,s,n)=>s in l?U(l,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[s]=n,m=(l,s)=>{for(var n in s||(s={}))K.call(s,n)&&T(l,n,s[n]);if(M)for(var n of M(s))W.call(s,n)&&T(l,n,s[n]);return l},u=(l,s)=>q(l,J(s));import{a as G,r as c,u as _,$ as Q,bd as X,bg as Z,aj as ee,aq as se,I as y,j as e,_ as a,e as te,S as ae,p as h,E as v,b as N,K as ne,H as ie,f as le,c as oe,z as re}from"./main-762.js";import{d as de,E as ce,R as z}from"./bf-1-346.js";import{t as L}from"./bf-281-48.js";import{u as me,P as ue,C as fe}from"./bf-685-46.js";import"./bf-241-52.js";function _e(){const{css:l}=G(),[s,n]=c.useState({sub:"Confirm the submission",body:de,dflt_temp:!0,day:1,custom_redirect:0,acti_succ_msg:"Thanks for the confirmation.",already_activated_msg:"Your mail is already confirmed!",invalid_key_msg:"Sorry! Your URL Is Invalid!"}),R=_(Q),[S,f]=c.useState(!1),[F,k]=c.useState(!1),[p,x]=c.useState(!1),{isPro:P,allPages:C}=R,[$,w]=c.useState(!1),b=_(X),[B,E]=c.useState({show:!1}),I=_(Z),g=ee(se),{isLoading:A,mutate:H}=me("bitforms_get_double_opt_in",{formID:I},{fetchCondition:y,onSuccess:t=>{var o,i;x(Number((o=t[0])==null?void 0:o.status));const r=JSON.parse((i=t[0])==null?void 0:i.integration_details);n(r)}}),D=({target:{name:t,value:r}})=>{n(o=>u(m({},o),{[t]:r})),g(o=>u(m({},o),{unsaved:!0}))},j=({target:{checked:t}},r)=>{const o=ie(s);t?o[r]=!0:delete o[r],n(o),g(i=>u(m({},i),{unsaved:!0}))},V=t=>{y&&(t.target.checked?x(1):x(0),g(r=>u(m({},r),{unsaved:!0})))},Y=t=>{if(t.preventDefault(),!y)return;if(s.dflt_temp&&((s==null?void 0:s.fldkey)===void 0||(s==null?void 0:s.fldkey)==="")){E({show:!0,msg:a("Email field is mandatory for double opt-in.")});return}w(!0);const r=le(s,i=>{i.formId=I,i.status=p}),o=oe(r,"bitforms_save_double_opt_in").then(i=>{var O;i!=null&&i.success&&!((O=i==null?void 0:i.data)!=null&&O.errors)&&(w(!1),H(r))});re.promise(o,{success:a("Saved successfully."),loading:a("Saving..."),error:a("Something went wrong, Try again.")})},d={};return p?(d.opacity=1,d.pointerEvents="auto",d.userSelect="auto"):(d.opacity=.6,d.pointerEvents="none",d.userSelect="none"),e.jsxs("div",{className:"pos-rel",children:[e.jsx("h2",{children:a("Double Opt-In")}),e.jsxs("h5",{children:[a("How to setup Double Opt-In & Send Email Notification:")," ",e.jsx("a",{href:L.doubleOptIn.link,target:"_blank",rel:"noreferrer",className:"yt-txt",children:a("YouTube")})," ",e.jsx("a",{href:L.doubleOptInDoc.link,target:"_blank",rel:"noreferrer",className:"doc-txt",children:a("Documentation")})]}),!P&&e.jsx(ue,{style:{height:"111%",left:-53}}),A?e.jsx(te,{style:{display:"flex",justifyContent:"center",alignItems:"center",height:70,transform:"scale(0.7)"}}):e.jsxs("div",{children:[e.jsx(ae,{snack:B,setSnackbar:E}),e.jsxs("div",{className:"mt-6 flx",children:[e.jsx("label",{htmlFor:"status",children:e.jsx("b",{children:a("Enable")})}),e.jsx(h,{name:"status",action:V,checked:p===1,className:"ml-4 flx"})]}),e.jsxs("div",{style:d,children:[e.jsx("br",{}),e.jsxs("div",{className:"flx",children:[e.jsx(h,{name:"auto_unconfirmed_deleted",action:t=>j(t,"auto_unconfirmed_deleted"),checked:"auto_unconfirmed_deleted"in s,className:"flx"}),e.jsx("label",{htmlFor:"auto_unconfirmed_deleted",children:a("Delete the unconfirmed entries from responses after days:")})," ",e.jsx("input",{onChange:D,name:"day",value:(s==null?void 0:s.day)||1,disabled:!s.auto_unconfirmed_deleted,className:"btcd-paper-inp mr-2 wdt-100",placeholder:"1",type:"number",min:"1"})]}),e.jsxs("div",{className:"mt-2 flx",children:[e.jsx(h,{name:"disable_loggin_user",action:t=>j(t,"disable_loggin_user"),checked:"disable_loggin_user"in s,className:"flx"}),e.jsx("label",{htmlFor:"disable_loggin_user",children:a("Disable double opt-in confirmation for logged in users.")})]}),e.jsxs("div",{className:"mt-4 flx",children:[e.jsx(h,{name:"dflt_temp",action:t=>j(t,"dflt_temp"),checked:!!(s!=null&&s.dflt_temp),className:"flx"}),e.jsx("label",{htmlFor:"dflt_temp",children:a("Configure default confirmation email template")}),e.jsx(fe,{className:"ml-1",icnSize:14,width:600,children:a("By disabling this option, you can configure the double opt-in confirmation email from Conditional Logics manually.")})]}),(s==null?void 0:s.dflt_temp)&&e.jsxs("div",{className:"w-8",children:[e.jsxs("div",{className:"w-5 mt-4",children:[e.jsx("b",{children:"Email"}),e.jsx("br",{}),e.jsxs("select",{className:"btcd-paper-inp mt-1 w-9",name:"fldkey",value:s==null?void 0:s.fldkey,defaultValue:"empty",onChange:D,children:[e.jsx("option",{disabled:!0,value:"empty",children:a("Select Email Field")}),b==null?void 0:b.filter(t=>t.type==="email").map(t=>e.jsx("option",{value:t.key,children:t.name},`${t.key}-1`))]})]}),e.jsxs("div",{className:"flx",children:[e.jsxs("button",{type:"button",className:l(N.btn),onClick:()=>k(!0),children:[e.jsx(v,{size:18})," ",a("Customize Email template")]}),e.jsx(ce,{dataConf:s,setDataConf:n,showMdl:F,setshowMdl:k,title:"Customize Email template"}),(s==null?void 0:s.dflt_temp)&&e.jsxs("div",{className:"ml-2",children:[e.jsxs("button",{type:"button",className:l(N.btn),onClick:()=>f(!0),children:[e.jsx(v,{size:18})," ",a("Edit verification messages")]}),e.jsx(z,{dataConf:s,setDataConf:n,showMdl:S,setCustomRedirectMdl:f,pages:C,title:"Edit verification messages"})]})]})]}),!(s!=null&&s.dflt_temp)&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"mb-0",children:[e.jsx("strong",{children:"Note: "}),e.jsx("span",{children:"Please make sure you have configured the "}),e.jsx("strong",{children:"double opt-in"}),e.jsx("span",{children:" from "}),e.jsx("strong",{children:"conditional logics."}),e.jsx("br",{}),e.jsx("span",{children:"Otherwise, the confirmation message will not sent to the responder."})]}),e.jsxs("div",{children:[e.jsxs("button",{type:"button",className:l(N.btn),onClick:()=>f(!0),children:[e.jsx(v,{size:18})," ",a("Edit verification messages")]}),e.jsx(z,{dataConf:s,setDataConf:n,showMdl:S,setCustomRedirectMdl:f,pages:C,title:"Show after verification"})]})]})]}),e.jsx("div",{className:"br-5 w-6",children:e.jsxs("p",{className:"mt-0",children:[e.jsx("strong",{children:a("Note :")}),a("The webhook, email notification & integrations will trigger after the responder confirms their Opt-In.")]})}),e.jsx(ne,{onClick:Y,disabled:$,children:a("Save ")})]})]})}export{_e as default};
2