options.js
44 lines
| 1 | /** |
| 2 | * WordPress dependencies |
| 3 | */ |
| 4 | const { __ } = wp.i18n; |
| 5 | |
| 6 | /** |
| 7 | * Options data for various form selects |
| 8 | */ |
| 9 | const giveFormOptions = {}; |
| 10 | |
| 11 | // Form Order By |
| 12 | giveFormOptions.orderBy = [ |
| 13 | {value: 'date', label: __('Date Created')}, |
| 14 | {value: 'name', label: __('Form Name')}, |
| 15 | {value: 'amount_donated', label: __('Amount Donated')}, |
| 16 | {value: 'number_donations', label: __('Number of Donations')}, |
| 17 | {value: 'menu_order', label: __('Menu Order')}, |
| 18 | {value: 'post__in', label: __('Provided Form IDs')}, |
| 19 | {value: 'closest_to_goal', label: __('Closest To Goal')} |
| 20 | ]; |
| 21 | |
| 22 | // Form Order |
| 23 | giveFormOptions.order = [ |
| 24 | {value: 'DESC', label: __('Descending')}, |
| 25 | {value: 'ASC', label: __('Ascending')}, |
| 26 | ]; |
| 27 | |
| 28 | // Form Display Styles |
| 29 | giveFormOptions.columns = [ |
| 30 | { value: 'best-fit', label: __( 'Best Fit' ) }, |
| 31 | { value: '1', label: '1' }, |
| 32 | { value: '2', label: '2' }, |
| 33 | { value: '3', label: '3' }, |
| 34 | { value: '4', label: '4' }, |
| 35 | ]; |
| 36 | |
| 37 | // Form Display Styles |
| 38 | giveFormOptions.displayType = [ |
| 39 | { value: 'redirect', label: __( 'Redirect' ) }, |
| 40 | { value: 'modal_reveal', label: __( 'Modal' ) }, |
| 41 | ]; |
| 42 | |
| 43 | export default giveFormOptions; |
| 44 |