| 1 |
import {__, sprintf} from "@wordpress/i18n"; |
| 2 |
import {createInterpolateElement} from "@wordpress/element"; |
| 3 |
import {CheckVerified} from "@givewp/components/AdminUI/Icons"; |
| 4 |
|
| 5 |
/** |
| 6 |
* @since 3.16.0 |
| 7 |
*/ |
| 8 |
export const UpgradeModalContent = () => { |
| 9 |
|
| 10 |
const {supportedAddons, supportedGateways} = window.GiveDonationForms; |
| 11 |
|
| 12 |
return <p style={{maxWidth: '400px'}}> |
| 13 |
{createInterpolateElement( |
| 14 |
sprintf(__('GiveWP 3.0 introduces an enhanced forms experience powered by the new Visual Donation Form Builder. The team is still working on add-on and gateway compatibility. If you need to use an add-on or gateway that isn\'t listed, use the "%sAdd form%s" option for now.', 'give'), '<b>', '</b>'), |
| 15 |
{ |
| 16 |
b: <strong />, |
| 17 |
} |
| 18 |
)} |
| 19 |
<br /> |
| 20 |
{supportedAddons.length > 0 && ( |
| 21 |
<SupportedItemsList title={__('Supported add-ons', 'give')} items={supportedAddons} /> |
| 22 |
)} |
| 23 |
<br /> |
| 24 |
{supportedGateways.length > 0 && ( |
| 25 |
<SupportedItemsList title={__('Supported gateways', 'give')} items={supportedGateways} /> |
| 26 |
)} |
| 27 |
<div> |
| 28 |
<a href="https://docs.givewp.com/compat-guide" rel="noopener noreferrer" target="_blank"> |
| 29 |
{__('Read more on Add-ons and Gateways compatibility', 'give')} |
| 30 |
</a> |
| 31 |
</div> |
| 32 |
</p> |
| 33 |
} |
| 34 |
|
| 35 |
const SupportedItemsList = ({title, items}) => { |
| 36 |
return ( |
| 37 |
<> |
| 38 |
<h3>{title}</h3> |
| 39 |
<ul> |
| 40 |
{items.map((item) => ( |
| 41 |
<li key={item}> |
| 42 |
<CheckVerified /> {item} |
| 43 |
</li> |
| 44 |
))} |
| 45 |
</ul> |
| 46 |
</> |
| 47 |
) |
| 48 |
} |
| 49 |
|