PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.1.2
JetFormBuilder — Dynamic Blocks Form Builder v3.1.2
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / modules / captcha / assets-src / js / turnstile / editor / TurnstileOptions.js
jetformbuilder / modules / captcha / assets-src / js / turnstile / editor Last commit date
TurnstileBlockEdit.js 2 years ago TurnstileOptions.js 2 years ago TurnstileProvider.js 2 years ago main.js 2 years ago preview.js 2 years ago variation.js 2 years ago
TurnstileOptions.js
76 lines
1 const {
2 __,
3 } = wp.i18n;
4 const {
5 ToggleControl,
6 BaseHelp,
7 } = JetFBComponents;
8 const {
9 useCaptchaProvider,
10 } = JetFBHooks;
11 let {
12 TextControl,
13 NumberControl,
14 __experimentalNumberControl,
15 ExternalLink,
16 } = wp.components;
17
18 NumberControl = NumberControl || __experimentalNumberControl;
19
20 const currentTab = JetFBActions.globalTab( {
21 slug: 'captcha-tab',
22 element: 'turnstile',
23 empty: {},
24 } );
25
26 function TurnstileOptions() {
27 const [ providerArgs, setProviderArgs ] = useCaptchaProvider();
28
29 const currentArgs = providerArgs.use_global
30 ? currentTab
31 : providerArgs;
32
33 return <>
34 <ToggleControl
35 checked={ providerArgs.use_global }
36 onChange={ use_global => setProviderArgs(
37 { use_global } ) }
38 >
39 { __( 'Use', 'jet-form-builder' ) + ' ' }
40 <a href={ JetFormEditorData.global_settings_url +
41 '#captcha-tab__turnstile' }>
42 { __( 'Global Settings', 'jet-form-builder' ) }
43 </a>
44 </ToggleControl>
45 <TextControl
46 label={ __( 'Site Key:', 'jet-form-builder' ) }
47 value={ currentArgs.key }
48 help={ __(
49 'Read the hint to the Secret Key field',
50 'jet-form-builder',
51 ) }
52 disabled={ providerArgs.use_global }
53 onChange={ key => setProviderArgs( { key } ) }
54 />
55 <TextControl
56 label={ __( 'Secret Key:', 'jet-form-builder' ) }
57 value={ currentArgs.secret }
58 help={ __(
59 'You can find both keys on your Turnstile Site settings page',
60 'jet-form-builder',
61 ) }
62 disabled={ providerArgs.use_global }
63 onChange={ secret => setProviderArgs( { secret } ) }
64 />
65 <BaseHelp>
66 { __( 'Didn\'t find it? Here is', 'jet-form-builder' ) + ' ' }
67 <ExternalLink
68 href={ 'https://developers.cloudflare.com/turnstile/get-started/#get-a-sitekey-and-secret-key' }
69 >
70 { __( 'a more detailed description', 'jet-form-builder' ) }
71 </ExternalLink>
72 </BaseHelp>
73 </>;
74 }
75
76 export default TurnstileOptions;