PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 2.23.1
GiveWP – Donation Plugin and Fundraising Platform v2.23.1
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
give / blocks / components / edit-form / index.js
index.js
42 lines 984 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * WordPress dependencies
3 */
4 import { __ } from '@wordpress/i18n'
5 import { Button } from '@wordpress/components';
6
7 /**
8 * Internal dependencies
9 */
10 import { getSiteUrl } from '../../utils';
11 import GiveBlankSlate from '../blank-slate';
12
13 /**
14 * Render No forms Found UI
15 */
16
17 const EditForm = ( { attributes, setAttributes, formId } ) => {
18 const changeForm = () => {
19 setAttributes( { prevId: attributes.id } );
20 setAttributes( { id: 0 } );
21 };
22
23 return (
24 <GiveBlankSlate title={ __( 'Edit Form.' ) }
25 description={ __( 'An error occured with donation form settings that rendered the preview inaccessible.', 'give' ) }>
26 <Button isPrimary
27 isLarge
28 target="_blank"
29 href={ `${ getSiteUrl() }/wp-admin/post.php?post=${ formId }&action=edit` }>
30 { __( 'Edit Donation Form', 'give' ) }
31 </Button>
32 &nbsp;&nbsp;
33 <Button isLarge
34 onClick={ changeForm }>
35 { __( 'Change Form', 'give' ) }
36 </Button>
37 </GiveBlankSlate>
38 );
39 };
40
41 export default EditForm;
42