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 / DonateUrlWarningModal.js

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

62 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from '@wordpress/i18n';
2
3 /**
4 * Non-blocking warning shown when the user publishes a campaign that has a
5 * donation_form element with no URL configured and no payment page set in the
6 * Advanced tab (bpc_form_page_id === 0).
7 *
8 * The user can dismiss and fix the URL, or proceed to publish anyway.
9 */
10 export default function DonateUrlWarningModal( { onProceed, onCancel } ) {
11 return (
12 <div className="bp-name-modal-overlay" onClick={ onCancel }>
13 <div
14 className="bp-title-required-modal"
15 onClick={ ( e ) => e.stopPropagation() }
16 style={ { maxWidth: '400px' } }
17 >
18 <div className="bp-title-required-modal__icon">
19 <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
20 <circle cx="12" cy="12" r="12" fill="#ecc30b" />
21 <text
22 x="12" y="17"
23 textAnchor="middle"
24 fill="#1a1a2e"
25 fontSize="14"
26 fontWeight="bold"
27 fontFamily="serif"
28 >!</text>
29 </svg>
30 </div>
31
32 <h3 className="bp-title-required-modal__heading">
33 { __( 'Donate button has no URL', 'better-payment' ) }
34 </h3>
35
36 <p className="bp-title-required-modal__body">
37 { __(
38 'Your Donate button isn\’t set up yet. Add a payment page URL in the Donate Button settings so visitors can make donations.','better-payment'
39 ) }
40 </p>
41
42 <div style={ { display: 'flex', gap: '10px', justifyContent: 'center', marginTop: '4px' } }>
43 <button
44 className="bp-title-required-modal__ok"
45 style={ { background: '#6b63f6', minWidth: '120px', whiteSpace: 'nowrap' } }
46 onClick={ onCancel }
47 >
48 { __( 'Fix it', 'better-payment' ) }
49 </button>
50 <button
51 className="bp-title-required-modal__ok"
52 style={ { background: '#8a8fa6', minWidth: '140px', whiteSpace: 'nowrap' } }
53 onClick={ onProceed }
54 >
55 { __( 'Publish anyway', 'better-payment' ) }
56 </button>
57 </div>
58 </div>
59 </div>
60 );
61 }
62