PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 2.2.1
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v2.2.1
2.4.1 2.4.0 2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.2 2.2.1 2.2.0 2.1.2 2.1.1 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 All 68 releases
better-payment / src / campaign-builder / components / SettingsTab.js

SettingsTab.js in Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More 2.2.1, at src/campaign-builder/components/SettingsTab.js

70 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from '@wordpress/i18n';
2 import { getGlobalCurrencySymbol } from '../utils/currency';
3
4 /**
5 * Settings tab — full-width campaign settings view.
6 *
7 * Two collapsible sections matching the PRD:
8 * 7.1 General Settings
9 * 7.2 Donation Options
10 */
11 export default function SettingsTab( { meta, dispatch } ) {
12 const update = ( patch ) => dispatch( { type: 'UPDATE_META', payload: patch } );
13 const currencySymbol = getGlobalCurrencySymbol();
14
15 return (
16 <div className="bp-settings-tab">
17
18 {/* 7.1 General Settings */}
19 <div className="bp-settings-section">
20 <div className="bp-settings-section__header">
21 <h3>{ __( 'General Settings', 'better-payment' ) }</h3>
22 </div>
23 <div className="bp-settings-section__body">
24
25 <div className="bp-settings-row">
26 <div className="bp-settings-col bp-settings-col--full">
27 <label>{ __( 'Campaign Goal Amount', 'better-payment' ) }</label>
28 <div className="bp-settings-prefix-input">
29 <span className="bp-settings-prefix">{ currencySymbol }</span>
30 <input
31 type="number" min="0" step="1"
32 value={ meta.bpc_goal_amount }
33 onChange={ ( e ) => update( { bpc_goal_amount: e.target.value } ) }
34 placeholder="0"
35 />
36 </div>
37 </div>
38 </div>
39
40 <div className="bp-settings-row">
41 <div className="bp-settings-col bp-settings-col--full">
42 <label>{ __( 'Ending Date', 'better-payment' ) }</label>
43 <input
44 type="date"
45 value={ meta.bpc_end_date }
46 onChange={ ( e ) => update( { bpc_end_date: e.target.value } ) }
47 onClick={ ( e ) => e.target.showPicker?.() }
48 />
49 </div>
50 </div>
51
52 <div className="bp-settings-row">
53 <div className="bp-settings-col bp-settings-col--full">
54 <label>{ __( 'Custom CSS Class', 'better-payment' ) }</label>
55 <input
56 type="text"
57 value={ meta.bpc_css_class || '' }
58 onChange={ ( e ) => update( { bpc_css_class: e.target.value } ) }
59 placeholder="my-campaign-class"
60 />
61 </div>
62 </div>
63
64 </div>
65 </div>
66
67 </div>
68 );
69 }
70