PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / V3.3.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder vV3.3.2
V3.3.2 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 All 139 releases
bit-form / assets / bf-705-321.js

bf-705-321.js in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder V3.3.2, at assets/bf-705-321.js

2 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import{a as N,g as $,i as E,r as b,H as M,j as e,_ as a,h as l,E as S,R as P,t as v,M as C,b as g,f as F,bI as w,b1 as O}from"./main-96.js";import{s as R}from"./bf-621-177.js";import{F as T}from"./bf-460-326.js";import{d as k}from"./bf-781-46.js";import"./bf-163-182.js";function D(){var x,h;const{css:s}=N(),{fieldKey:t}=$(),[i,j]=E(O),[y,m]=b.useState(!1),p=b.useRef("");if(!t)return null;const r=M(i[t]),_=((r==null?void 0:r.config)||{}).emailTemplate||"",u=c=>{const n=F(i,d=>{d[t].config=d[t].config||{},d[t].config.emailTemplate=c});j(n),w({event:`OTP Email Template changed: ${t}`,type:"otp_email_template_changed",state:{fields:n,fldKey:t}})},o=()=>{var c,n;p.current=((n=(c=i[t])==null?void 0:c.config)==null?void 0:n.emailTemplate)||"",m(!0)},f=()=>{u(p.current),m(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:s(T.fieldSection),children:[e.jsxs("div",{className:s(l.flxcb),children:[e.jsx("span",{className:`title ${s(l.flxc)}`,children:a("Email Template")}),e.jsx("span",{role:"button",tabIndex:-1,className:s(l.mr2,l.cp),onClick:o,onKeyDown:o,children:e.jsx(S,{size:19})})]}),e.jsx("div",{role:"button",tabIndex:-1,className:`${s(T.input,l.px10,l.py5,R.childPmargin0,{h:"auto",fs:"12px !important"})} body`,onClick:o,onKeyDown:o,children:e.jsx(P,{html:v(_)})}),e.jsx("p",{className:s(l.helpText),children:a("Available placeholders: ${bf_otp_code}, ${bf_expiry_minutes}")}),e.jsxs("p",{className:s(l.helpText),children:[a("Note: To send OTP emails, SMTP must be configured on your site. You can set it up in Bit Form "),e.jsx("strong",{children:"App Settings > SMTP "}),a("section.")]})]}),e.jsxs(C,{md:!0,show:y,setModal:f,title:a("Edit OTP Email Template"),children:[e.jsx(k,{id:`otp-tmpl-${t}`,value:((h=(x=i[t])==null?void 0:x.config)==null?void 0:h.emailTemplate)||"",onChangeHandler:u}),e.jsx("p",{className:s({fs:"12px",c:"#888",mt:5}),children:a("Placeholders: ${bf_otp_code} — the OTP code, ${bf_expiry_minutes} — expiry time in minutes")}),e.jsxs("div",{className:"mt-2 f-right",children:[e.jsx("button",{type:"button",className:`${s(g.btn)} mr-2`,onClick:f,children:a("Cancel")}),e.jsx("button",{type:"button",className:`${s(g.btn)} blue`,onClick:()=>m(!1),children:a("Save")})]})]})]})}export{D as default};
2