| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | /** |
| 2 | 2 | * WordPress dependencies |
| 3 | 3 | */ |
| 4 | -const { __ } = wp.i18n; | |
| 4 | +import {__} from '@wordpress/i18n' | |
| 5 | 5 | |
| 6 | 6 | /** |
| 7 | 7 | * Options data for various form selects |
| 8 | 8 | */ |
| @@ -7,20 +7,50 @@ | ||
| 7 | 7 | * Options data for various form selects |
| 8 | 8 | */ |
| 9 | 9 | const giveFormOptions = {}; |
| 10 | 10 | |
| 11 | +// Form Order By | |
| 12 | +giveFormOptions.orderBy = [ | |
| 13 | + {value: 'date', label: __('Date Created', 'give')}, | |
| 14 | + {value: 'title', label: __('Form Name', 'give')}, | |
| 15 | + {value: 'amount_donated', label: __('Amount Donated', 'give')}, | |
| 16 | + {value: 'number_donations', label: __('Number of Donations', 'give')}, | |
| 17 | + {value: 'menu_order', label: __('Menu Order', 'give')}, | |
| 18 | + {value: 'post__in', label: __('Provided Form IDs', 'give')}, | |
| 19 | + {value: 'closest_to_goal', label: __('Closest To Goal', 'give')}, | |
| 20 | + {value: 'random', label: __('Random', 'give')}, | |
| 21 | +]; | |
| 22 | + | |
| 23 | +// Form Order | |
| 24 | +giveFormOptions.order = [ | |
| 25 | + {value: 'DESC', label: __('Descending', 'give')}, | |
| 26 | + {value: 'ASC', label: __('Ascending', 'give')}, | |
| 27 | +]; | |
| 28 | + | |
| 11 | 29 | // Form Display Styles |
| 12 | 30 | giveFormOptions.columns = [ |
| 13 | - { value: 'best-fit', label: __( 'Best Fit' ) }, | |
| 14 | - { value: '1', label: '1' }, | |
| 15 | - { value: '2', label: '2' }, | |
| 16 | - { value: '3', label: '3' }, | |
| 17 | - { value: '4', label: '4' }, | |
| 31 | + {value: '1', label: __('Full Width', 'give')}, | |
| 32 | + {value: '2', label: __('Double', 'give')}, | |
| 33 | + {value: '3', label: __('Triple', 'give')}, | |
| 34 | + {value: '4', label: __('Max (4)', 'give')}, | |
| 18 | 35 | ]; |
| 19 | 36 | |
| 20 | 37 | // Form Display Styles |
| 21 | 38 | giveFormOptions.displayType = [ |
| 22 | - { value: 'redirect', label: __( 'Redirect' ) }, | |
| 23 | - { value: 'modal', label: __( 'Modal' ) }, | |
| 39 | + {value: 'redirect', label: __('Redirect', 'give')}, | |
| 40 | + {value: 'modal_reveal', label: __('Modal', 'give')}, | |
| 24 | 41 | ]; |
| 42 | + | |
| 43 | +//Filter | |
| 44 | +giveFormOptions.filter = [ | |
| 45 | + {value: 'formIDs', label: __('Form ID', 'give')}, | |
| 46 | + {value: 'categories', label: __('Categories', 'give')}, | |
| 47 | + {value: 'tags', label: __('Tags', 'give')}, | |
| 48 | +]; | |
| 49 | + | |
| 50 | +//Image Height | |
| 51 | +giveFormOptions.imageHeight = [ | |
| 52 | + {value: 'auto', label: __('Auto', 'give')}, | |
| 53 | + {value: 'custom', label: __('Custom', 'give')}, | |
| 54 | +] | |
| 25 | 55 | |
| 26 | 56 | export default giveFormOptions; |