Changeset 3008933
- Timestamp:
- 12/12/2023 05:12:20 PM (2 years ago)
- Location:
- wired-impact-volunteer-management/trunk
- Files:
-
- 2 added
- 15 edited
-
README.txt (modified) (2 diffs)
-
admin/class-admin.php (modified) (4 diffs)
-
admin/js/admin.js (modified) (1 diff)
-
cypress/e2e/gravity-forms-integration.cy.js (modified) (6 diffs)
-
cypress/e2e/settings.cy.js (modified) (3 diffs)
-
cypress/e2e/volunteer-sign-up.cy.js (modified) (2 diffs)
-
cypress/support/commands.js (modified) (2 diffs)
-
frontend/class-public.php (modified) (3 diffs)
-
includes/class-activator.php (modified) (1 diff)
-
includes/class-gravity-forms-feed-addon-bootstrap.php (added)
-
includes/class-gravity-forms-feed-addon.php (added)
-
includes/class-gravity-forms.php (modified) (1 diff)
-
includes/class-opportunity.php (modified) (3 diffs)
-
includes/class-volunteer.php (modified) (2 diffs)
-
includes/class-wi-volunteer-management.php (modified) (4 diffs)
-
languages/wired-impact-volunteer-management.pot (modified) (11 diffs)
-
wivm.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wired-impact-volunteer-management/trunk/README.txt
r3004340 r3008933 5 5 Tested up to: 6.4 6 6 Requires PHP: 5.2.4 7 Stable tag: 2. 07 Stable tag: 2.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 120 120 == Changelog == 121 121 122 = 2.1 = 123 * Added the ability to pass volunteer data submitted in Gravity Forms to the volunteer management system. 124 * Hide the chosen Gravity Forms form if no more volunteer spots are available. 125 * Removed bug fix for the 'Visual' tab of the editor used to email volunteers now that the issue is fixed in WordPress Core. 126 * Stopped loading jQuery UI styles across the entire admin since it was conflicting with other plugins. 127 122 128 = 2.0 = 123 129 * Included the ability for admins to remove the built-in signup form from volunteer opportunities. -
wired-impact-volunteer-management/trunk/admin/class-admin.php
r3004340 r3008933 135 135 /** 136 136 * Register the stylesheets for the admin area. 137 */ 138 public function enqueue_styles() { 139 140 wp_enqueue_style( 'wp-pointer' ); 141 wp_enqueue_style( 'jquery-ui-smoothness', plugin_dir_url( __FILE__ ) . 'css/jquery-ui.css' ); 142 wp_enqueue_style( 'wivm-styles', plugin_dir_url( __FILE__ ) . 'css/admin.css', array(), $this->version, 'all' ); 143 137 * 138 * @param string $hook The current admin page. 139 */ 140 public function enqueue_styles( $hook ) { 141 142 wp_enqueue_style( 'wp-pointer' ); 143 144 // Only enqueue jQuery UI styles if we're creating or editing a Volunteer Management Opportunity. 145 if ( in_array( $hook, array( 'post.php', 'post-new.php' ), true ) ) { 146 147 $screen = get_current_screen(); 148 if ( is_object( $screen ) && $screen->post_type === 'volunteer_opp' ) { 149 150 wp_enqueue_style( 'jquery-ui-smoothness', plugin_dir_url( __FILE__ ) . 'css/jquery-ui.css', array(), $this->version ); 151 } 152 } 153 154 wp_enqueue_style( 'wivm-styles', plugin_dir_url( __FILE__ ) . 'css/admin.css', array(), $this->version ); 144 155 } 145 156 146 157 /** 147 158 * Register the JavaScript for the admin area. 159 * 160 * @param string $hook The current admin page. 148 161 */ 149 162 public function enqueue_scripts( $hook ) { 150 163 151 wp_enqueue_script( 'wp-pointer' ); 152 wp_enqueue_script( 'jquery-ui-slider' ); 153 wp_enqueue_script( 'jquery-ui-datepicker' ); 154 155 // Only enqueue TimePicker if we are creating or editing a Volunteer Management Opportunity 156 if( in_array( $hook, array( 'post.php', 'post-new.php' ) ) ) { 157 158 $screen = get_current_screen(); 159 if( is_object( $screen ) && 'volunteer_opp' == $screen->post_type ) { 160 wp_enqueue_script( 'jquery-timepicker', plugin_dir_url( __FILE__ ) . 'js/jquery-ui-timepicker.js', array( 'jquery-ui-core', 'jquery-ui-slider', 'jquery-ui-datepicker' ) ); 161 } 162 } 163 164 wp_enqueue_script( 'wivm-admin', plugin_dir_url( __FILE__ ) . 'js/admin.js', array( 'jquery' ), $this->version, false ); 164 wp_enqueue_script( 'wp-pointer' ); 165 166 // Only enqueue TimePicker if we're creating or editing a Volunteer Management Opportunity. 167 if ( in_array( $hook, array( 'post.php', 'post-new.php' ), true ) ) { 168 169 $screen = get_current_screen(); 170 if ( is_object( $screen ) && $screen->post_type === 'volunteer_opp' ) { 171 172 wp_enqueue_script( 'jquery-timepicker', plugin_dir_url( __FILE__ ) . 'js/jquery-ui-timepicker.js', array( 'jquery-ui-core', 'jquery-ui-slider', 'jquery-ui-datepicker' ), $this->version, false ); 173 } 174 } 175 176 wp_enqueue_script( 'wivm-admin', plugin_dir_url( __FILE__ ) . 'js/admin.js', array( 'jquery' ), $this->version, false ); 165 177 wp_localize_script( 'wivm-admin', 'wivm_ajax', $this->get_localized_js_data() ); 166 167 178 } 168 179 … … 170 181 * Get all the JS data we want to display. This allows us to use PHP to include information 171 182 * within the JS. 172 * 183 * 173 184 * @return array Data to be displayed in the admin page's JS. 174 185 */ 175 public function get_localized_js_data(){ 186 public function get_localized_js_data() { 187 176 188 $data = array( 177 // translators: date only format for jQuery UI Datepicker, see http://api.jqueryui.com/datepicker/#utility-formatDate178 'datepicker_date_format' => __( 'D, MM dd, yy', 'wired-impact-volunteer-management' ),179 // translators: time only format for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker/180 'datepicker_time_format' => __( 'h:mm tt', 'wired-impact-volunteer-management' ),181 // translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker/182 'datepicker_separator' => __( ' @ ', 'wired-impact-volunteer-management' ),189 // translators: date only format for jQuery UI Datepicker, see http://api.jqueryui.com/datepicker/#utility-formatDate. 190 'datepicker_date_format' => __( 'D, MM dd, yy', 'wired-impact-volunteer-management' ), 191 // translators: time only format for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker/. 192 'datepicker_time_format' => __( 'h:mm tt', 'wired-impact-volunteer-management' ), 193 // translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker/. 194 'datepicker_separator' => __( ' @ ', 'wired-impact-volunteer-management' ), 183 195 'remove_rsvp_pointer_text' => '<h3>' . __( 'Are You Sure?', 'wired-impact-volunteer-management' ) . '</h3><p>' . __( 'Are you sure you want to remove their RSVP for this opportunity?', 'wired-impact-volunteer-management' ) . '</p>', 184 196 'remove_rsvp_cancel_text' => __( 'Cancel', 'wired-impact-volunteer-management' ), … … 191 203 'remove_user_rsvp_nonce' => wp_create_nonce( 'remove_user_rsvp_nonce' ), 192 204 'hide_notice_nonce' => wp_create_nonce( 'hide_notice_nonce' ), 193 'volunteer_email_nonce' => wp_create_nonce( 'volunteer_email_nonce' ) 205 'volunteer_email_nonce' => wp_create_nonce( 'volunteer_email_nonce' ), 194 206 ); 195 207 … … 723 735 } else { 724 736 725 // Set the editor ID 737 // Set the editor ID, content and options. 726 738 $editor_id = 'volunteer-email-editor'; 727 739 $content = get_option( $editor_id ); 728 729 /**730 * Set the editor options array.731 *732 * Due to a bug in WordPress 5.6+, the wp_editor instance has to be733 * output with the 'Text' tab selected by default.734 *735 * Once this bug is fixed we can remove the 'default_editor' option.736 *737 * @link https://core.trac.wordpress.org/ticket/52050738 */739 740 $editor_options = array( 740 741 'media_buttons' => false, 741 742 'textarea_name' => $editor_id, 742 743 'editor_height' => 150, 743 'default_editor' => 'html',744 744 ); 745 746 745 ?> 747 746 -
wired-impact-volunteer-management/trunk/admin/js/admin.js
r3004340 r3008933 304 304 if ( $( email_editor ).exists() ) { 305 305 306 /**307 * Due to a bug in WordPress 5.6+, the wp_editor instance has to be308 * output with the 'Text' tab selected by default.309 *310 * This code clicks the 'Visual' tab to switch to the TinyMCE editor,311 * which is what most users will want to use.312 *313 * Issue Trac Ticket: https://core.trac.wordpress.org/ticket/52050314 */315 setTimeout( function() {316 $( '#volunteer-email-editor-tmce' ).click();317 }, 1000 );318 319 306 $( '.wivm-send-email' ).on( 'click', function( event ) { 320 307 event.preventDefault(); -
wired-impact-volunteer-management/trunk/cypress/e2e/gravity-forms-integration.cy.js
r3004340 r3008933 5 5 * - The Wired Impact Volunteer Management plugin is installed. 6 6 * - The Gravity Forms plugin is installed. 7 * - A Gravity Forms form ID for volunteer signups is set in the Cypress config file.7 * - The Gravity Forms CLI plugin is installed and activated. 8 8 */ 9 9 describe('Gravity Forms Integration', () => { … … 13 13 cy.deleteSavedPluginSettings(); 14 14 cy.createSingleVolunteerOpp(); 15 cy.trashAllGravityFormsForms(); 16 cy.createVolunteerSignupForm(); 15 17 }); 16 18 … … 19 21 }); 20 22 21 it('Allows Gravity Forms form to be used when the plugin is activated', () =>{23 it('Allows Gravity Forms form to be displayed when the plugin is activated', function() { 22 24 23 25 // The Gravity Forms form should show when the default setting is saved as "Custom Form" … … 25 27 cy.contains('#wivm-tabs a', 'Opportunity Defaults').click(); 26 28 cy.contains('tr', 'Default Form Type').find('select').select('gravity_forms'); 27 cy.contains('tr', 'Select a Default Form').find('select').select( Cypress.env('gravityFormsSignupFormID'));29 cy.contains('tr', 'Select a Default Form').find('select').select(this.volunteerSignupFormID); 28 30 cy.contains('input', 'Save Changes').click(); 29 31 30 32 cy.visit('/volunteer-opportunity/clean-up-trash/'); 31 cy.get('form#gform_' + Cypress.env('gravityFormsSignupFormID')).should('exist');33 cy.get('form#gform_' + this.volunteerSignupFormID).should('exist'); 32 34 33 35 // The Gravity Forms form should show when the volunteer opportunity's setting is saved as "Custom Form" … … 37 39 cy.contains('input', 'Save Changes').click(); 38 40 39 cy.visit('/volunteer-opportunity/clean-up-trash/'); 40 cy.contains('a', 'Edit Volunteer Opportunity').click(); 41 cy.visit('/wp-admin/post.php?post=' + this.volunteerOppID + '&action=edit'); 41 42 cy.contains('tr', 'Form Type').find('select').select('gravity_forms'); 42 cy.contains('tr', 'Select a Form').find('select').select( Cypress.env('gravityFormsSignupFormID'));43 cy.contains('tr', 'Select a Form').find('select').select(this.volunteerSignupFormID); 43 44 cy.contains('button','Update').click(); 44 45 cy.contains('div', 'Post updated').find('a').click(); 45 46 46 cy.get('form#gform_' + Cypress.env('gravityFormsSignupFormID')).should('exist');47 cy.get('form#gform_' + this.volunteerSignupFormID).should('exist'); 47 48 }); 48 49 49 it('Does not show Gravity Forms settings when the plugin is deactivated', () => { 50 it('Passes data from Gravity Forms to the volunteer management system and shows necessary errors', function() { 51 52 // A Volunteer Management feed can be saved 53 cy.visit('/wp-admin/admin.php?page=gf_edit_forms&view=settings&id=' + this.volunteerSignupFormID); 54 cy.contains('nav a', 'Volunteer Mgmt').click(); 55 cy.contains('a.button', 'Add New').click(); 56 cy.get('#feed_name').type('Volunteer Management Feed'); 57 cy.contains('tr', 'First Name').find('select').select('Name (First)').should('have.value', '1.3'); 58 cy.contains('tr', 'Last Name').find('select').select('Name (Last)').should('have.value', '1.6'); 59 cy.contains('tr', 'Phone Number').find('select').select('Phone').should('have.value', '3'); 60 cy.contains('tr', 'Email').find('select').select('Email').should('have.value', '4'); 61 cy.contains('button','Save Settings').click(); 62 63 // Select to display the Gravity Forms form 64 cy.visit('/wp-admin/post.php?post=' + this.volunteerOppID + '&action=edit'); 65 cy.contains('tr', 'Form Type').find('select').select('gravity_forms'); 66 cy.contains('tr', 'Select a Form').find('select').select(this.volunteerSignupFormID); 67 cy.contains('button','Update').click(); 68 cy.contains('div', 'Post updated').find('a').click(); 69 70 // Errors display when the form is submitted with the name, phone and email fields blank, even though they aren't required 71 cy.contains('input[type="submit"]', 'Submit').click(); 72 cy.contains('fieldset', 'Name').find('div.validation_message').should('have.text', 'This field is required.'); 73 cy.contains('div.gfield', 'Phone').find('div.validation_message').should('have.text', 'This field is required.'); 74 cy.contains('div.gfield', 'Email').find('div.validation_message').should('have.text', 'This field is required.'); 75 76 // Submitting the form successfully passes data to the volunteer management system, which then shows in the post's edit screen 77 cy.contains('fieldset', 'Name').find('.name_first input').type('Abraham'); 78 cy.contains('fieldset', 'Name').find('.name_last input').type('Lincoln'); 79 cy.contains('div.gfield', 'Phone').find('input').type('(888) 777-6666'); 80 cy.contains('div.gfield', 'Email').find('input').type('abraham@usa.gov'); 81 cy.contains('input[type="submit"]', 'Submit').click(); 82 cy.visit('/wp-admin/post.php?post=' + this.volunteerOppID + '&action=edit'); 83 cy.get('.rsvp-list-table table').contains('td[data-colname="Name"]', 'Abraham Lincoln').should('exist'); 84 cy.get('.rsvp-list-table table').contains('td[data-colname="E-mail"]', 'abraham@usa.gov').should('exist'); 85 cy.get('.rsvp-list-table table').contains('td[data-colname="Phone"]', '(888) 777-6666').should('exist'); 86 87 // A note is added to the Gravity Forms entry when a volunteer signs up successfully 88 cy.visit('/wp-admin/admin.php?page=gf_entries'); 89 cy.contains('a', 'Abraham').click(); 90 cy.contains('.gforms_note_wired-impact-volunteer-management', 'The volunteer successfully signed up for this opportunity.').should('exist'); 91 92 // An error shows in the Gravity Forms entry when the same volunteer signs up again 93 cy.visit('/volunteer-opportunity/clean-up-trash/'); 94 cy.contains('fieldset', 'Name').find('.name_first input').type('Abraham'); 95 cy.contains('fieldset', 'Name').find('.name_last input').type('Lincoln'); 96 cy.contains('div.gfield', 'Phone').find('input').type('(888) 777-6666'); 97 cy.contains('div.gfield', 'Email').find('input').type('abraham@usa.gov'); 98 cy.contains('input[type="submit"]', 'Submit').click(); 99 cy.visit('/wp-admin/admin.php?page=gf_entries'); 100 cy.contains('a', 'Abraham').click(); 101 cy.contains('.gforms_note_wired-impact-volunteer-management', 'Error Sending Data to the Volunteer Management System: The volunteer has already signed up for this opportunity.').should('exist'); 102 103 // The form is hidden when the max number of volunteers has been reached 104 cy.visit('/wp-admin/post.php?post=' + this.volunteerOppID + '&action=edit'); 105 cy.get('#has-volunteer-limit').check(); 106 cy.get('#volunteer-limit').type('1'); 107 cy.contains('button','Update').click(); 108 cy.contains('div', 'Post updated').find('a').click(); 109 cy.visit('/volunteer-opportunity/clean-up-trash/'); 110 cy.get('form#gform_' + this.volunteerSignupFormID).should('not.exist'); 111 cy.contains('p', 'We’re sorry, but we’re no longer accepting new volunteers for this opportunity.').should('exist'); 112 }); 113 114 it('Does not show Gravity Forms settings when the plugin is deactivated', function() { 50 115 51 116 cy.visit('/wp-admin/plugins.php'); … … 59 124 60 125 // The Gravity Forms option should be hidden in the single opportunity settings 61 cy.visit('/volunteer-opportunity/clean-up-trash/'); 62 cy.contains('a', 'Edit Volunteer Opportunity').click(); 126 cy.visit('/wp-admin/post.php?post=' + this.volunteerOppID + '&action=edit'); 63 127 cy.contains('tr', 'Form Type').find('select option[value="gravity_forms"]').should('not.exist'); 64 128 cy.contains('tr', 'Select a Form').should('not.exist'); -
wired-impact-volunteer-management/trunk/cypress/e2e/settings.cy.js
r3004340 r3008933 126 126 }); 127 127 128 it('Displays the correct form based on the settings', () =>{128 it('Displays the correct form based on the settings', function() { 129 129 130 130 // The built-in form should show by default when the plugin is first activated … … 146 146 147 147 // The built-in form should show when the volunteer opportunity's setting is saved as "Built-In Signup Form" 148 cy. contains('a', 'Edit Volunteer Opportunity').click();148 cy.visit('/wp-admin/post.php?post=' + this.volunteerOppID + '&action=edit'); 149 149 cy.contains('tr', 'Form Type').find('select').select('built_in_form'); 150 150 cy.contains('button','Update').click(); … … 158 158 159 159 // No form should show when the volunteer opportunity's setting is saved as "No Form" 160 cy. contains('a', 'Edit Volunteer Opportunity').click();160 cy.visit('/wp-admin/post.php?post=' + this.volunteerOppID + '&action=edit'); 161 161 cy.contains('tr', 'Form Type').find('select').select('no_form'); 162 162 cy.contains('button','Update').click(); -
wired-impact-volunteer-management/trunk/cypress/e2e/volunteer-sign-up.cy.js
r3004340 r3008933 13 13 }); 14 14 15 it('Allows volunteers to sign up, be viewed in the admin, and removed from opportunities', () =>{15 it('Allows volunteers to sign up, be viewed in the admin, and removed from opportunities', function() { 16 16 17 17 // Submit the form to sign up as a volunteer … … 27 27 // Save the volunteer opportunity that was created with WP-CLI to ensure all meta is stored 28 28 cy.login(); 29 cy.visit('/volunteer-opportunity/clean-up-trash/'); 30 cy.contains('a', 'Edit Volunteer Opportunity').click(); 29 cy.visit('/wp-admin/post.php?post=' + this.volunteerOppID + '&action=edit'); 31 30 cy.contains('button','Update').click(); 32 31 cy.contains('div', 'Post updated').should('exist'); -
wired-impact-volunteer-management/trunk/cypress/support/commands.js
r3004340 r3008933 45 45 46 46 cy.exec(Cypress.env('wpCLIPrefix') + ' post delete $(' + Cypress.env('wpCLIPrefix') + ' post list --post_type=volunteer_opp --format=ids) --force'); 47 cy.exec(Cypress.env('wpCLIPrefix') + ' post create --post_type=volunteer_opp --post_title="Clean up Trash" --post_status="publish"'); 47 cy.exec(Cypress.env('wpCLIPrefix') + ' post create --post_type=volunteer_opp --post_title="Clean up Trash" --post_status="publish"').then((result) => { 48 49 let stdOutParts = result.stdout.slice(0, -1); 50 stdOutParts = stdOutParts.split(' '); 51 const volunteerOppID = stdOutParts[stdOutParts.length - 1]; 52 53 // Store the post ID so we can use it throughout our tests. 54 cy.wrap(volunteerOppID).as('volunteerOppID'); 55 }); 48 56 }); 49 57 … … 63 71 cy.exec(Cypress.env('wpCLIPrefix') + ' user delete abraham@usa.gov --yes'); 64 72 }); 73 74 /** 75 * Trash all existing Gravity Forms forms using WP-CLI. 76 * 77 * This command requires the Gravity Forms CLI plugin be installed 78 * and activated. 79 */ 80 Cypress.Commands.add('trashAllGravityFormsForms', () => { 81 82 cy.exec(Cypress.env('wpCLIPrefix') + ' gf form delete $(' + Cypress.env('wpCLIPrefix') + ' gf form list --format=ids)'); 83 }); 84 85 /** 86 * Create a Gravity Forms Volunteer Signup form to use for testing. 87 * 88 * The JSON for the form was created by exporting the form from a website. 89 * 90 * This command requires the Gravity Forms CLI plugin be installed 91 * and activated. 92 */ 93 Cypress.Commands.add('createVolunteerSignupForm', () => { 94 95 const formJSON = {"fields":[{"type":"name","id":1,"formId":6,"label":"Name","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","nameFormat":"advanced","inputs":[{"id":"1.2","label":"Prefix","name":"","autocompleteAttribute":"honorific-prefix","choices":[{"text":"Dr.","value":"Dr."},{"text":"Miss","value":"Miss"},{"text":"Mr.","value":"Mr."},{"text":"Mrs.","value":"Mrs."},{"text":"Ms.","value":"Ms."},{"text":"Mx.","value":"Mx."},{"text":"Prof.","value":"Prof."},{"text":"Rev.","value":"Rev."}],"isHidden":true,"inputType":"radio"},{"id":"1.3","label":"First","name":"","autocompleteAttribute":"given-name"},{"id":"1.4","label":"Middle","name":"","autocompleteAttribute":"additional-name","isHidden":true},{"id":"1.6","label":"Last","name":"","autocompleteAttribute":"family-name"},{"id":"1.8","label":"Suffix","name":"","autocompleteAttribute":"honorific-suffix","isHidden":true}],"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":"","maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","productField":"","layoutGridColumnSpan":"","enableEnhancedUI":0,"layoutGroupId":"b7373b44","fields":"","displayOnly":""},{"type":"phone","id":3,"formId":6,"label":"Phone","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"phoneFormat":"international","autocompleteAttribute":"tel","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":"","maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"choices":"","conditionalLogic":"","productField":"","layoutGridColumnSpan":12,"enableEnhancedUI":0,"layoutGroupId":"33f7781e","fields":"","displayOnly":""},{"type":"email","id":4,"formId":6,"label":"Email","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","inputs":null,"autocompleteAttribute":"email","description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":"","maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"choices":"","conditionalLogic":"","productField":"","layoutGridColumnSpan":12,"emailConfirmEnabled":"","enableEnhancedUI":0,"layoutGroupId":"9467c1ea","fields":"","displayOnly":""},{"type":"select","id":6,"formId":6,"label":"T-Shirt Size","adminLabel":"","isRequired":false,"size":"large","errorMessage":"","visibility":"visible","validateState":true,"inputs":null,"choices":[{"text":"Extra Small","value":"Extra Small","isSelected":false,"price":""},{"text":"Small","value":"Small","isSelected":false,"price":""},{"text":"Medium","value":"Medium","isSelected":false,"price":""},{"text":"Large","value":"Large","isSelected":false,"price":""},{"text":"Extra Large","value":"Extra Large","isSelected":false,"price":""}],"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","conditionalLogic":"","productField":"","layoutGridColumnSpan":12,"enablePrice":"","enableEnhancedUI":0,"layoutGroupId":"73e95759","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"useRichTextEditor":false,"errors":[],"fields":""},{"type":"textarea","id":5,"formId":6,"label":"Why do you want to volunteer with us?","adminLabel":"","isRequired":false,"size":"medium","errorMessage":"","visibility":"visible","inputs":null,"description":"","allowsPrepopulate":false,"inputMask":false,"inputMaskValue":"","inputMaskIsCustom":false,"maxLength":"","inputType":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","cssClass":"","inputName":"","noDuplicates":false,"defaultValue":"","enableAutocomplete":false,"autocompleteAttribute":"","choices":"","conditionalLogic":"","productField":"","layoutGridColumnSpan":12,"form_id":"","useRichTextEditor":false,"enableEnhancedUI":0,"layoutGroupId":"a96865a7","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"errors":[],"fields":""}],"button":{"type":"text","text":"","imageUrl":"","width":"auto","location":"bottom","layoutGridColumnSpan":12},"title":"Volunteer Signup","description":"","version":"2.7.17.1","id":6,"markupVersion":2,"nextFieldId":7,"useCurrentUserAsAuthor":true,"postContentTemplateEnabled":false,"postTitleTemplateEnabled":false,"postTitleTemplate":"","postContentTemplate":"","lastPageButton":null,"pagination":null,"firstPageCssClass":null,"confirmations":[{"id":"65734ead4e58d","name":"Default Confirmation","isDefault":true,"type":"message","message":"Thanks for signing up to volunteer!","url":"","pageId":"","queryString":"","event":"","disableAutoformat":false,"page":"","conditionalLogic":[]}],"notifications":[{"id":"65734ead4e18f","isActive":true,"to":"{admin_email}","name":"Admin Notification","event":"form_submission","toType":"email","subject":"New submission from {form_title}","message":"{all_fields}"}]}; 96 97 cy.exec(Cypress.env('wpCLIPrefix') + ' gf form create "Volunteer Signup" "" --form-json=\'' + JSON.stringify(formJSON) + '\'').then((result) => { 98 99 const stdOutParts = result.stdout.split(' '); 100 const formID = stdOutParts[stdOutParts.length - 1]; 101 102 // Store the form ID so we can use it throughout our tests. 103 cy.wrap(formID).as('volunteerSignupFormID'); 104 }); 105 }); -
wired-impact-volunteer-management/trunk/frontend/class-public.php
r3004340 r3008933 463 463 464 464 /** 465 * Process the AJAX request from the volunteer opportunity sign up form. 466 * 467 * @return int|bool The user ID if everything worked, false otherwise 468 */ 469 public function process_volunteer_sign_up(){ 470 $form_fields = array(); 471 parse_str( $_POST['data'], $form_fields ); 465 * Process the AJAX request when a volunteer signs up for an opportunity 466 * using the built-in form. 467 * 468 * @return void This method echoes the response back to the user, then dies. 469 */ 470 public function process_builtin_form_volunteer_sign_up() { 471 472 $form_data = array(); 473 parse_str( $_POST['data'], $form_data ); 472 474 473 475 // Verify our nonce. 474 if( !wp_verify_nonce( $form_fields['wivm_sign_up_form_nonce_field'], 'wivm_sign_up_form_nonce' ) ) { 476 if ( ! wp_verify_nonce( $form_data['wivm_sign_up_form_nonce_field'], 'wivm_sign_up_form_nonce' ) ) { 477 475 478 _e( 'Security Check.', 'wired-impact-volunteer-management' ); 476 479 die(); … … 478 481 479 482 // If the honeypot field exists and is filled out then bail. 480 if( isset( $form_fields['wivm_hp'] ) && $form_fields['wivm_hp'] != '' ){ 483 if ( isset( $form_data['wivm_hp'] ) && $form_data['wivm_hp'] != '' ) { 484 481 485 _e( 'Security Check.', 'wired-impact-volunteer-management' ); 482 486 die(); 483 487 } 484 488 485 $opp = new WI_Volunteer_Management_Opportunity( $form_fields['wivm_opportunity_id'] ); 486 if ( $opp->should_allow_rvsps() == true ) { 489 $result = self::process_volunteer_sign_up( $form_data ); 490 491 echo $result; 492 493 die(); // Must use die() when using AJAX. 494 } 495 496 /** 497 * Process a volunteer signup. 498 * 499 * This includes updating the volunteer's information and RSVPing 500 * them for the opportunity. 501 * 502 * This is called both when a volunteer signs up using the built-in form 503 * and when a volunteer signs up using a third-party form. 504 * 505 * @param array $form_data The form fields data submitted by the volunteer. 506 * @return string The coded result of the signup process. 507 */ 508 public static function process_volunteer_sign_up( $form_data ) { 509 510 $opp = new WI_Volunteer_Management_Opportunity( $form_data['wivm_opportunity_id'] ); 511 512 // If the opportunity is allowing RSVPs. 513 if ( $opp->should_allow_rvsps() === true ) { 487 514 488 515 // Add or update the new volunteer user. 489 $user = new WI_Volunteer_Management_Volunteer( null, $form_ fields);516 $user = new WI_Volunteer_Management_Volunteer( null, $form_data ); 490 517 491 518 // RSVP this volunteer for the opportunity. 492 $rsvp = new WI_Volunteer_Management_RSVP( $user->ID, $form_ fields['wivm_opportunity_id'] );519 $rsvp = new WI_Volunteer_Management_RSVP( $user->ID, $form_data['wivm_opportunity_id'] ); 493 520 494 521 // If the person hadn't already RSVPed then send out the signup emails. 495 if ( $rsvp->rsvped == true ) { 522 if ( $rsvp->rsvped === true ) { 523 496 524 $email = new WI_Volunteer_Management_Email( $opp, $user ); 497 525 … … 499 527 $email->send_admin_signup_email(); 500 528 $result = 'rsvped'; 501 } 502 else { 529 530 } else { 531 503 532 $result = 'already_rsvped'; 504 533 } 505 506 } 507 // If RSVPs have been closed. 508 else { 534 } else { // If RSVPs have been closed, typically if no more spots are available. 535 509 536 $result = 'rsvp_closed'; 510 537 } 511 538 512 // Return a message which tells us what messages to show on the frontend. 513 echo $result; 514 515 die(); // Must use die() when using AJAX. 539 // Return a coded result which tells us what messages to show on the frontend. 540 return $result; 516 541 } 517 542 -
wired-impact-volunteer-management/trunk/includes/class-activator.php
r1728767 r3008933 59 59 * @since 1.3.3 60 60 */ 61 public static function activate_site(){ 61 public static function activate_site() { 62 62 63 WI_Volunteer_Management_Public::register_post_types(); 63 64 flush_rewrite_rules(); 64 65 65 // Add our volunteer role66 // Add our volunteer role. 66 67 add_role( 67 'volunteer',68 __( 'Volunteer', 'wired-impact-volunteer-management' ),69 array(70 'read'=> true,71 'serve_as_volunteer' => true //Custom capability72 )68 'volunteer', 69 __( 'Volunteer', 'wired-impact-volunteer-management' ), 70 array( 71 'read' => true, 72 'serve_as_volunteer' => true, // Custom capability. 73 ) 73 74 ); 74 75 75 // Add our default options if they don't already exist.76 // Add our default options if they don't already exist. 76 77 $options = new WI_Volunteer_Management_Options(); 77 78 $options->set_defaults(); -
wired-impact-volunteer-management/trunk/includes/class-gravity-forms.php
r3004340 r3008933 208 208 echo apply_filters( 'wivm_sign_up_form_heading', '<h3 class="wivm-form-heading">' . $form_heading_text . '</h3>', $volunteer_opp ); 209 209 210 gravity_form( $volunteer_opp->opp_meta['form_id'], false, false, false, false, true ); 210 if ( $volunteer_opp->should_allow_rvsps() ) { 211 212 gravity_form( $volunteer_opp->opp_meta['form_id'], false, false, false, false, true ); 213 214 } else { 215 216 echo '<p>' . __( 'We\'re sorry, but we\'re no longer accepting new volunteers for this opportunity.', 'wired-impact-volunteer-management' ) . '</p>'; 217 } 211 218 } 212 219 } -
wired-impact-volunteer-management/trunk/includes/class-opportunity.php
r3004340 r3008933 98 98 /** 99 99 * Display meta information for this opportunity including a heading. 100 * 100 * 101 101 * @param string $meta_value The meta information to display. 102 102 * @param string $heading The heading to display in front of the meta information is one exists. 103 * @return mixed Returns an empty string if no meta value, or it will echo the resulting string.104 */ 105 public function display_meta( $meta_value, $heading = '' ) {103 * @return mixed Returns an empty string if no meta value, or it will echo the resulting string. 104 */ 105 public function display_meta( $meta_value, $heading = '' ) { 106 106 107 107 if( $meta_value == '' ){ … … 319 319 /** 320 320 * Get the number of RSVPs that have taken place for this opportunity. 321 * 321 * 322 322 * @return int The number of RSVPs for this opportunity. 323 323 */ 324 public function get_number_rsvps(){ 324 public function get_number_rsvps() { 325 325 326 global $wpdb; 326 327 327 $num_rsvps = $wpdb->get_var( $wpdb->prepare( 328 " 329 SELECT COUNT(*) 330 FROM " . $wpdb->prefix . "volunteer_rsvps 331 WHERE post_id = %d and rsvp = %d 332 ", 333 array( $this->ID, 1 ) 334 ) ); 328 $num_rsvps = $wpdb->get_var( 329 $wpdb->prepare( 330 ' 331 SELECT COUNT(*) 332 FROM ' . $wpdb->prefix . 'volunteer_rsvps 333 WHERE post_id = %d and rsvp = %d 334 ', 335 array( $this->ID, 1 ) 336 ) 337 ); 335 338 336 339 return $num_rsvps; … … 359 362 /** 360 363 * Return whether we should allow people to sign up for this opportunity. 361 * 362 * @return bool true if we should allow signups, false if not 363 */ 364 public function should_allow_rvsps(){ 364 * 365 * @return bool true if we should allow signups, false if not. 366 */ 367 public function should_allow_rvsps() { 368 365 369 $num_rsvps = $this->get_number_rsvps(); 366 370 367 //If there is a limit and its been reached then return false 368 if( $this->opp_meta['has_volunteer_limit'] == 1 && $num_rsvps >= $this->opp_meta['volunteer_limit'] ){ 371 // If there is a limit and its been reached then return false. 372 if ( $this->opp_meta['has_volunteer_limit'] == 1 && $num_rsvps >= $this->opp_meta['volunteer_limit'] ) { 373 369 374 return false; 370 375 } 371 376 372 377 return true; 373 378 } -
wired-impact-volunteer-management/trunk/includes/class-volunteer.php
r1773565 r3008933 250 250 * Get the admin link to look at this specific volunteer. 251 251 * 252 * This is not a link to the typical user edit screen. This page includes a lot of information on the 252 * This is not a link to the typical user edit screen. This page includes a lot of information on the 253 253 * volunteer including the contact info, notes on them and which volunteer opportunities they signed up for. 254 * 255 * @param int $user_id The volunteer's ID256 * @return string The URL needed to view this volunteer's information.257 */ 258 public function get_admin_url() {259 260 return get_admin_url( null, 'admin.php?page=wi-volunteer-management-volunteer&user_id=' . $this->ID ); 254 * 255 * @param int $user_id The volunteer's ID. 256 * @return string The URL needed to view this volunteer's information. 257 */ 258 public function get_admin_url() { 259 260 return get_admin_url( null, 'admin.php?page=wi-volunteer-management-volunteer&user_id=' . $this->ID ); 261 261 } 262 262 263 263 /** 264 264 * Create a new volunteer user or update one if the email address is already used. 265 * 266 * @param array $form_fields The submitted volunteer opportunity form info267 * @return int The user id of the new or updated WordPress user268 */269 public function create_update_user( $form_fields ){ 270 // Prepare userdata to be added for a new user or updated for an existing user.271 $userdata = array( 272 'first_name' => sanitize_text_field( $form_fields['wivm_first_name'] ),273 'last_name' => sanitize_text_field( $form_fields['wivm_last_name'] ),265 * 266 * @param array $form_fields The submitted volunteer opportunity form info. 267 */ 268 public function create_update_user( $form_fields ) { 269 270 // Prepare userdata to be added for a new user or updated for an existing user. 271 $userdata = array( 272 'first_name' => sanitize_text_field( $form_fields['wivm_first_name'] ), 273 'last_name' => sanitize_text_field( $form_fields['wivm_last_name'] ), 274 274 ); 275 275 276 // Check if the email address is already in use and if not, create a new user.277 $wivm_email = sanitize_email( $form_fields['wivm_email'] );276 // Check if the email address is already in use and if not, create a new user. 277 $wivm_email = sanitize_email( $form_fields['wivm_email'] ); 278 278 $existing_user = email_exists( $wivm_email ); 279 if( !$existing_user ){ 280 $userdata['user_login'] = $wivm_email; 281 $userdata['user_email'] = $wivm_email; 282 $userdata['user_pass'] = wp_generate_password(); 283 $userdata['role'] = 'volunteer'; 279 280 if ( ! $existing_user ) { 281 282 $userdata['user_login'] = $wivm_email; 283 $userdata['user_email'] = $wivm_email; 284 $userdata['user_pass'] = wp_generate_password(); 285 $userdata['role'] = 'volunteer'; 284 286 285 287 $user_id = wp_insert_user( $userdata ); 286 } 287 //If the user already exists, update the user based on their email address288 else { 288 289 } else { // If the user already exists, update the user based on their email address. 290 289 291 $userdata['ID'] = $existing_user; 290 292 291 293 $user_id = wp_update_user( $userdata ); 292 294 293 //On multisite we need to add the user to this site if they don't have access 294 if( is_multisite() && !is_user_member_of_blog( $userdata['ID'] ) ){ 295 // On multisite we need to add the user to this site if they don't have access. 296 if ( is_multisite() && ! is_user_member_of_blog( $userdata['ID'] ) ) { 297 295 298 add_user_to_blog( get_current_blog_id(), $userdata['ID'], 'volunteer' ); 296 299 update_user_option( $userdata['ID'], 'notes', '' ); … … 298 301 } 299 302 300 // Update custom user meta for new and existing volunteers301 update_user_option( $user_id, 'phone', preg_replace( "/[^0-9]/", "", $form_fields['wivm_phone'] ) );303 // Update custom user meta for new and existing volunteers. 304 update_user_option( $user_id, 'phone', preg_replace( '/[^0-9]/', '', $form_fields['wivm_phone'] ) ); 302 305 303 306 $this->ID = $user_id; -
wired-impact-volunteer-management/trunk/includes/class-wi-volunteer-management.php
r3004340 r3008933 69 69 70 70 $this->plugin_name = 'wired-impact-volunteer-management'; 71 $this->version = '2. 0';71 $this->version = '2.1'; 72 72 73 73 $this->load_dependencies(); … … 166 166 */ 167 167 require_once WIVM_DIR . 'includes/class-gravity-forms.php'; 168 169 /** 170 * The class responsible for bootstrapping the Gravity Forms feed add-on to pass data into the volunteer management system. 171 */ 172 require_once WIVM_DIR . 'includes/class-gravity-forms-feed-addon-bootstrap.php'; 168 173 169 174 $this->loader = new WI_Volunteer_Management_Loader(); … … 246 251 $this->loader->add_filter( 'excerpt_more', $plugin_public, 'hide_default_read_more', 11 ); 247 252 $this->loader->add_filter( 'the_content', $plugin_public, 'show_meta_form_single' ); 248 $this->loader->add_action( 'wp_ajax_wivm_sign_up', $plugin_public, 'process_ volunteer_sign_up' );249 $this->loader->add_action( 'wp_ajax_nopriv_wivm_sign_up', $plugin_public, 'process_ volunteer_sign_up' );253 $this->loader->add_action( 'wp_ajax_wivm_sign_up', $plugin_public, 'process_builtin_form_volunteer_sign_up' ); 254 $this->loader->add_action( 'wp_ajax_nopriv_wivm_sign_up', $plugin_public, 'process_builtin_form_volunteer_sign_up' ); 250 255 $this->loader->add_action( 'send_auto_email_reminders', $plugin_public, 'send_email_reminder' ); 251 256 $this->loader->add_action( 'widgets_init', $plugin_widget, 'register_widget' ); … … 263 268 $this->loader->add_action( 'wivm_show_volunteer_sign_up_form', $gravity_forms, 'show_volunteer_sign_up_form' ); 264 269 $this->loader->add_action( 'wp_enqueue_scripts', $gravity_forms, 'enqueue_scripts' ); 270 $this->loader->add_action( 'gform_loaded', 'WI_Volunteer_Management_Gravity_Forms_Feed_AddOn_Bootstrap', 'load', 5 ); 265 271 } 266 272 } -
wired-impact-volunteer-management/trunk/languages/wired-impact-volunteer-management.pot
r3004340 r3008933 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Wired Impact Volunteer Management 2. 0\n"5 "Project-Id-Version: Wired Impact Volunteer Management 2.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wired-impact-volunteer-management\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2023-1 1-30T22:10:44+00:00\n"12 "POT-Creation-Date: 2023-12-12T16:46:07+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.8.1\n" … … 16 16 17 17 #. Plugin Name of the plugin 18 #: admin/class-admin.php:2 5818 #: admin/class-admin.php:270 19 19 msgid "Wired Impact Volunteer Management" 20 20 msgstr "" … … 36 36 msgstr "" 37 37 38 #. translators: date only format for jQuery UI Datepicker, see http://api.jqueryui.com/datepicker/#utility-formatDate 39 #: admin/class-admin.php:1 7838 #. translators: date only format for jQuery UI Datepicker, see http://api.jqueryui.com/datepicker/#utility-formatDate. 39 #: admin/class-admin.php:190 40 40 msgid "D, MM dd, yy" 41 41 msgstr "" 42 42 43 #. translators: time only format for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker 44 #: admin/class-admin.php:1 8043 #. translators: time only format for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker/. 44 #: admin/class-admin.php:192 45 45 msgid "h:mm tt" 46 46 msgstr "" 47 47 48 #. translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker 49 #: admin/class-admin.php:1 8248 #. translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker/. 49 #: admin/class-admin.php:194 50 50 msgid " @ " 51 51 msgstr "" 52 52 53 #. translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker 54 #: admin/class-admin.php:1 8353 #. translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker/. 54 #: admin/class-admin.php:195 55 55 msgid "Are You Sure?" 56 56 msgstr "" 57 57 58 #. translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker 59 #: admin/class-admin.php:1 8358 #. translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker/. 59 #: admin/class-admin.php:195 60 60 msgid "Are you sure you want to remove their RSVP for this opportunity?" 61 61 msgstr "" 62 62 63 #: admin/class-admin.php:1 8463 #: admin/class-admin.php:196 64 64 msgid "Cancel" 65 65 msgstr "" 66 66 67 #: admin/class-admin.php:1 8568 #: admin/class-admin.php:6 7769 #: admin/class-admin.php:6 8770 #: admin/class-admin.php:7 0367 #: admin/class-admin.php:197 68 #: admin/class-admin.php:689 69 #: admin/class-admin.php:699 70 #: admin/class-admin.php:715 71 71 #: admin/pages/volunteer.php:92 72 72 #: admin/pages/volunteer.php:111 … … 74 74 msgstr "" 75 75 76 #: admin/class-admin.php:1 8676 #: admin/class-admin.php:198 77 77 msgid "Error, try again later." 78 78 msgstr "" 79 79 80 #: admin/class-admin.php:1 8780 #: admin/class-admin.php:199 81 81 msgid "Error sending the email. Try again later." 82 82 msgstr "" 83 83 84 #: admin/class-admin.php: 18884 #: admin/class-admin.php:200 85 85 msgid "Please fill out the email subject." 86 86 msgstr "" 87 87 88 #: admin/class-admin.php: 18988 #: admin/class-admin.php:201 89 89 msgid "Please fill out the email content." 90 90 msgstr "" 91 91 92 #: admin/class-admin.php: 19092 #: admin/class-admin.php:202 93 93 msgid "Your email has been sent to the volunteers!" 94 94 msgstr "" 95 95 96 #: admin/class-admin.php:2 1496 #: admin/class-admin.php:226 97 97 #: admin/class-form.php:65 98 98 #: admin/pages/volunteers.php:34 … … 100 100 msgstr "" 101 101 102 #: admin/class-admin.php:2 14103 #: admin/class-admin.php:2 36102 #: admin/class-admin.php:226 103 #: admin/class-admin.php:248 104 104 msgid "Help & Settings" 105 105 msgstr "" 106 106 107 #: admin/class-admin.php:2 15107 #: admin/class-admin.php:227 108 108 #: frontend/class-public.php:127 109 109 msgid "Volunteer Mgmt" 110 110 msgstr "" 111 111 112 #: admin/class-admin.php:2 28112 #: admin/class-admin.php:240 113 113 msgid "Volunteers" 114 114 msgstr "" 115 115 116 #: admin/class-admin.php:2 44117 #: includes/class-activator.php:6 8116 #: admin/class-admin.php:256 117 #: includes/class-activator.php:69 118 118 msgid "Volunteer" 119 119 msgstr "" 120 120 121 #: admin/class-admin.php:2 65121 #: admin/class-admin.php:277 122 122 msgid "Opportunities" 123 123 msgstr "" 124 124 125 #: admin/class-admin.php:3 32125 #: admin/class-admin.php:344 126 126 msgid "Use the text editor above to include information such as what volunteers will be doing, any requirements or preparation needed from volunteers, how the community will benefit and other details aside from those provided below." 127 127 msgstr "" 128 128 129 #: admin/class-admin.php:3 43129 #: admin/class-admin.php:355 130 130 msgid "Volunteer Opportunity Details" 131 131 msgstr "" 132 132 133 #: admin/class-admin.php:3 52133 #: admin/class-admin.php:364 134 134 msgid "Volunteer Opportunity RSVPs" 135 135 msgstr "" 136 136 137 #: admin/class-admin.php:3 61137 #: admin/class-admin.php:373 138 138 msgid "Email Your Volunteers" 139 139 msgstr "" 140 140 141 #: admin/class-admin.php:3 70141 #: admin/class-admin.php:382 142 142 msgid "Emails Sent to Volunteers" 143 143 msgstr "" 144 144 145 #: admin/class-admin.php: 394145 #: admin/class-admin.php:406 146 146 msgid "Contact Information" 147 147 msgstr "" 148 148 149 #: admin/class-admin.php:398 150 #: admin/class-admin.php:674 151 #: admin/class-admin.php:684 152 #: admin/class-admin.php:700 149 #: admin/class-admin.php:410 150 #: admin/class-admin.php:686 151 #: admin/class-admin.php:696 152 #: admin/class-admin.php:712 153 #: includes/class-gravity-forms-feed-addon.php:106 154 #: includes/class-gravity-forms-feed-addon.php:110 155 #: includes/class-gravity-forms-feed-addon.php:172 153 156 #: includes/class-wp-volunteer-list-table.php:161 154 157 msgid "Name" 155 158 msgstr "" 156 159 157 #: admin/class-admin.php:403 158 #: admin/class-admin.php:878 160 #: admin/class-admin.php:415 161 #: admin/class-admin.php:877 162 #: includes/class-gravity-forms-feed-addon.php:137 159 163 #: includes/class-wp-volunteer-list-table.php:163 160 164 msgid "Phone Number" 161 165 msgstr "" 162 166 163 #: admin/class-admin.php:4 08167 #: admin/class-admin.php:420 164 168 #: admin/pages/help-settings.php:34 169 #: includes/class-gravity-forms-feed-addon.php:144 165 170 msgid "Email" 166 171 msgstr "" 167 172 168 #: admin/class-admin.php:4 14173 #: admin/class-admin.php:426 169 174 msgid "Location Information" 170 175 msgstr "" 171 176 172 #: admin/class-admin.php:4 18177 #: admin/class-admin.php:430 173 178 msgid "Location Name" 174 179 msgstr "" 175 180 176 #: admin/class-admin.php:4 23181 #: admin/class-admin.php:435 177 182 msgid "Street Address" 178 183 msgstr "" 179 184 180 #: admin/class-admin.php:4 28185 #: admin/class-admin.php:440 181 186 msgid "City" 182 187 msgstr "" 183 188 184 #: admin/class-admin.php:4 33189 #: admin/class-admin.php:445 185 190 msgid "State" 186 191 msgstr "" 187 192 188 #: admin/class-admin.php:4 38193 #: admin/class-admin.php:450 189 194 msgid "Zip" 190 195 msgstr "" 191 196 192 #: admin/class-admin.php:4 44197 #: admin/class-admin.php:456 193 198 msgid "Date and Time" 194 199 msgstr "" 195 200 196 #: admin/class-admin.php:4 48201 #: admin/class-admin.php:460 197 202 msgid "One-Time Opportunity?" 198 203 msgstr "" 199 204 200 #: admin/class-admin.php:4 51205 #: admin/class-admin.php:463 201 206 msgid "This is a one-time opportunity at a fixed date and time." 202 207 msgstr "" 203 208 204 #: admin/class-admin.php:4 57209 #: admin/class-admin.php:469 205 210 msgid "Start Date & Time" 206 211 msgstr "" 207 212 208 #: admin/class-admin.php:4 65213 #: admin/class-admin.php:477 209 214 msgid "End Date & Time" 210 215 msgstr "" 211 216 212 #: admin/class-admin.php:4 69217 #: admin/class-admin.php:481 213 218 msgid "Whoops, it looks like you set your event to end before it started." 214 219 msgstr "" 215 220 216 #: admin/class-admin.php:4 74221 #: admin/class-admin.php:486 217 222 msgid "When Will This Event Happen?" 218 223 msgstr "" 219 224 220 #: admin/class-admin.php:4 75225 #: admin/class-admin.php:487 221 226 msgid "On your own time, All summer, etc." 222 227 msgstr "" 223 228 224 #: admin/class-admin.php:4 79229 #: admin/class-admin.php:491 225 230 msgid "Volunteer Limit" 226 231 msgstr "" 227 232 228 #: admin/class-admin.php:4 83233 #: admin/class-admin.php:495 229 234 msgid "Is There a Volunteer Limit?" 230 235 msgstr "" 231 236 232 #: admin/class-admin.php:4 86237 #: admin/class-admin.php:498 233 238 msgid "Only a fixed number of people can participate in this volunteer opportunity." 234 239 msgstr "" 235 240 236 #: admin/class-admin.php: 492241 #: admin/class-admin.php:504 237 242 msgid "Max Number of Volunteers" 238 243 msgstr "" 239 244 240 #: admin/class-admin.php: 497245 #: admin/class-admin.php:509 241 246 msgid "Volunteer Signup Form" 242 247 msgstr "" 243 248 244 #: admin/class-admin.php:5 01249 #: admin/class-admin.php:513 245 250 msgid "The built-in signup form includes name, email and phone number fields. It can't be modified." 246 251 msgstr "" 247 252 248 #: admin/class-admin.php:5 05253 #: admin/class-admin.php:517 249 254 msgid "Form Type" 250 255 msgstr "" 251 256 252 #: admin/class-admin.php:5 33257 #: admin/class-admin.php:545 253 258 #: admin/pages/help-settings.php:91 254 259 msgid "No Form" 255 260 msgstr "" 256 261 257 #: admin/class-admin.php:5 34262 #: admin/class-admin.php:546 258 263 #: admin/pages/help-settings.php:92 259 264 msgid "Built-In Signup Form" 260 265 msgstr "" 261 266 262 #: admin/class-admin.php:6 67267 #: admin/class-admin.php:679 263 268 msgid "Number of Open Spots: %s" 264 269 msgstr "" 265 270 266 #: admin/class-admin.php:6 68271 #: admin/class-admin.php:680 267 272 msgid "Number RSVPed: %d" 268 273 msgstr "" 269 274 270 #: admin/class-admin.php:6 75271 #: admin/class-admin.php:6 85272 #: admin/class-admin.php:7 01275 #: admin/class-admin.php:687 276 #: admin/class-admin.php:697 277 #: admin/class-admin.php:713 273 278 #: includes/class-wp-volunteer-list-table.php:162 274 279 msgid "E-mail" 275 280 msgstr "" 276 281 277 #: admin/class-admin.php:6 76278 #: admin/class-admin.php:6 86279 #: admin/class-admin.php:7 02282 #: admin/class-admin.php:688 283 #: admin/class-admin.php:698 284 #: admin/class-admin.php:714 280 285 msgid "Phone" 281 286 msgstr "" 282 287 283 #: admin/class-admin.php: 693288 #: admin/class-admin.php:705 284 289 msgid "No one has signed up for this opportunity yet." 285 290 msgstr "" 286 291 287 #: admin/class-admin.php:7 22292 #: admin/class-admin.php:734 288 293 msgid "No one has signed up for this opportunity, so you can't send any emails yet." 289 294 msgstr "" 290 295 291 #: admin/class-admin.php:75 1296 #: admin/class-admin.php:750 292 297 msgid "Below you can send a custom email to all volunteers who signed up for this opportunity. This is sent to the admins with the volunteers BCC'ed, so you know that the email was sent successfully. You can use the variables {opportunity_name}, {opportunity_date_time}, {opportunity_location}, {contact_name}, {contact_phone} and {contact_email} which will be replaced when the email is sent." 293 298 msgstr "" 294 299 295 #: admin/class-admin.php:75 3300 #: admin/class-admin.php:752 296 301 msgid "Email Subject" 297 302 msgstr "" 298 303 299 #: admin/class-admin.php:7 60304 #: admin/class-admin.php:759 300 305 msgid "Send Email" 301 306 msgstr "" 302 307 303 #: admin/class-admin.php:78 8304 #: admin/class-admin.php:111 8305 #: admin/class-admin.php:125 2306 #: frontend/class-public.php:47 5307 #: frontend/class-public.php:48 1308 #: admin/class-admin.php:787 309 #: admin/class-admin.php:1117 310 #: admin/class-admin.php:1251 311 #: frontend/class-public.php:478 312 #: frontend/class-public.php:485 308 313 msgid "Security Check." 309 314 msgstr "" 310 315 311 #: admin/class-admin.php:82 3316 #: admin/class-admin.php:822 312 317 msgctxt "email count" 313 318 msgid "<p>1 email has been sent.</p>" … … 316 321 msgstr[1] "" 317 322 323 #: admin/class-admin.php:829 324 #: admin/class-admin.php:924 325 msgid "When" 326 msgstr "" 327 318 328 #: admin/class-admin.php:830 319 #: admin/class-admin.php:925320 msgid "When"321 msgstr ""322 323 #: admin/class-admin.php:831324 329 msgid "Sender" 325 330 msgstr "" 326 331 327 #: admin/class-admin.php:8 40332 #: admin/class-admin.php:839 328 333 msgid "Automated Reminder Email" 329 334 msgstr "" 330 335 331 336 #. translators: date and time format for mysql2date() function, see http://php.net/manual/en/function.date.php 332 #: admin/class-admin.php:84 7337 #: admin/class-admin.php:846 333 338 msgid "D, M j, Y \\@ g:i a" 334 339 msgstr "" 335 340 336 #: admin/class-admin.php:86 4341 #: admin/class-admin.php:863 337 342 msgid "No emails have been sent yet. We'll list them here when we send automated reminders and when you send custom emails to volunteers." 338 343 msgstr "" 339 344 340 #: admin/class-admin.php:88 1345 #: admin/class-admin.php:880 341 346 msgid "Please enter your phone number in the format (000) 000-0000." 342 347 msgstr "" 343 348 344 #: admin/class-admin.php:88 5349 #: admin/class-admin.php:884 345 350 #: admin/pages/volunteer.php:39 346 351 msgid "Notes" 347 352 msgstr "" 348 353 349 #: admin/class-admin.php:88 8354 #: admin/class-admin.php:887 350 355 msgid "Please enter any notes about this user." 351 356 msgstr "" 352 357 358 #: admin/class-admin.php:922 359 msgid "Title" 360 msgstr "" 361 353 362 #: admin/class-admin.php:923 354 msgid "Title"355 msgstr ""356 357 #: admin/class-admin.php:924358 363 msgid "Location" 359 364 msgstr "" 360 365 366 #: admin/class-admin.php:925 367 msgid "Number of RSVPs" 368 msgstr "" 369 361 370 #: admin/class-admin.php:926 362 msgid "Number of RSVPs"363 msgstr ""364 365 #: admin/class-admin.php:927366 371 msgid "Number of Open Spots" 367 372 msgstr "" 368 373 369 #: admin/class-admin.php:105 3374 #: admin/class-admin.php:1052 370 375 msgid "All Opportunities" 371 376 msgstr "" 372 377 373 #: admin/class-admin.php:105 8378 #: admin/class-admin.php:1057 374 379 msgid "Upcoming One-time Opportunities" 375 380 msgstr "" 376 381 377 #: admin/class-admin.php:106 3382 #: admin/class-admin.php:1062 378 383 msgid "Past One-time Opportunities" 379 384 msgstr "" 380 385 381 #: admin/class-admin.php:106 8386 #: admin/class-admin.php:1067 382 387 msgid "Flexible Opportunities" 383 388 msgstr "" … … 689 694 msgstr "" 690 695 696 #: includes/class-gravity-forms-feed-addon.php:101 697 msgid "Volunteer Management Feed Settings" 698 msgstr "" 699 700 #: includes/class-gravity-forms-feed-addon.php:110 701 msgid "Enter a name to uniquely identify this feed." 702 msgstr "" 703 704 #: includes/class-gravity-forms-feed-addon.php:118 705 #: includes/class-gravity-forms-feed-addon.php:150 706 msgid "Map Fields" 707 msgstr "" 708 709 #: includes/class-gravity-forms-feed-addon.php:123 710 msgid "First Name" 711 msgstr "" 712 713 #: includes/class-gravity-forms-feed-addon.php:130 714 msgid "Last Name" 715 msgstr "" 716 717 #: includes/class-gravity-forms-feed-addon.php:150 718 msgid "Match the information needed for the volunteer management system with fields from your form." 719 msgstr "" 720 721 #: includes/class-gravity-forms-feed-addon.php:156 722 #: includes/class-gravity-forms-feed-addon.php:158 723 msgid "Conditional Logic" 724 msgstr "" 725 726 #: includes/class-gravity-forms-feed-addon.php:158 727 msgid "When conditional logic is enabled, form submissions will only be sent to the volunteer management system when the conditions are met. When disabled all form submissions will be sent." 728 msgstr "" 729 730 #: includes/class-gravity-forms-feed-addon.php:227 731 msgid "This field is required." 732 msgstr "" 733 734 #: includes/class-gravity-forms-feed-addon.php:277 735 #: templates/opp-single-form.php:24 736 msgid "We're sorry, but we weren't able to sign you up. We have no more open spots." 737 msgstr "" 738 739 #: includes/class-gravity-forms-feed-addon.php:309 740 msgid "Error Sending Data to the Volunteer Management System: The volunteer opportunity's ID was not provided correctly." 741 msgstr "" 742 743 #: includes/class-gravity-forms-feed-addon.php:325 744 msgid "Error Sending Data to the Volunteer Management System: The volunteer has already signed up for this opportunity." 745 msgstr "" 746 747 #: includes/class-gravity-forms-feed-addon.php:336 748 msgid "The volunteer successfully signed up for this opportunity." 749 msgstr "" 750 691 751 #: includes/class-gravity-forms.php:58 692 752 msgid "Custom Form" … … 713 773 #: templates/opp-single-form.php:15 714 774 msgid "Express Interest in Volunteering" 775 msgstr "" 776 777 #: includes/class-gravity-forms.php:216 778 #: templates/opp-single-form.php:55 779 msgid "We're sorry, but we're no longer accepting new volunteers for this opportunity." 715 780 msgstr "" 716 781 … … 800 865 msgstr "" 801 866 802 #: templates/opp-single-form.php:24803 msgid "We're sorry, but we weren't able to sign you up. We have no more open spots."804 msgstr ""805 806 867 #: templates/opp-single-form.php:25 807 868 msgid "Please fill in every field and make sure you entered a valid email address." … … 830 891 #: templates/opp-single-form.php:52 831 892 msgid "Express Interest" 832 msgstr ""833 834 #: templates/opp-single-form.php:55835 msgid "We're sorry, but we're no longer accepting new volunteers for this opportunity."836 893 msgstr "" 837 894 -
wired-impact-volunteer-management/trunk/wivm.php
r3004340 r3008933 17 17 * Plugin URI: https://wiredimpact.com/wordpress-plugins-for-nonprofits/volunteer-management/ 18 18 * Description: A simple, free way to keep track of your nonprofit’s volunteers and opportunities. 19 * Version: 2. 019 * Version: 2.1 20 20 * Author: Wired Impact 21 21 * Author URI: https://wiredimpact.com
Note: See TracChangeset
for help on using the changeset viewer.