Plugin Directory

Changeset 3008933


Ignore:
Timestamp:
12/12/2023 05:12:20 PM (2 years ago)
Author:
wiredimpact
Message:
  • Added the ability to pass volunteer data submitted in Gravity Forms to the volunteer management system.
  • Hide the chosen Gravity Forms form if no more volunteer spots are available.
  • Removed bug fix for the 'Visual' tab of the editor used to email volunteers now that the issue is fixed in WordPress Core.
  • Stopped loading jQuery UI styles across the entire admin since it was conflicting with other plugins.
Location:
wired-impact-volunteer-management/trunk
Files:
2 added
15 edited

Legend:

Unmodified
Added
Removed
  • wired-impact-volunteer-management/trunk/README.txt

    r3004340 r3008933  
    55Tested up to: 6.4
    66Requires PHP: 5.2.4
    7 Stable tag: 2.0
     7Stable tag: 2.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    120120== Changelog ==
    121121
     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
    122128= 2.0 =
    123129* 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  
    135135    /**
    136136     * 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 );
    144155    }
    145156
    146157    /**
    147158     * Register the JavaScript for the admin area.
     159     *
     160     * @param string $hook The current admin page.
    148161     */
    149162    public function enqueue_scripts( $hook ) {
    150163
    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 );
    165177        wp_localize_script( 'wivm-admin', 'wivm_ajax', $this->get_localized_js_data() );
    166 
    167178    }
    168179
     
    170181     * Get all the JS data we want to display. This allows us to use PHP to include information
    171182     * within the JS.
    172      * 
     183     *
    173184     * @return array Data to be displayed in the admin page's JS.
    174185     */
    175     public function get_localized_js_data(){
     186    public function get_localized_js_data() {
     187
    176188        $data = array(
    177             //translators: date only format for jQuery UI Datepicker, see http://api.jqueryui.com/datepicker/#utility-formatDate
    178             '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' ),
    183195            '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>',
    184196            'remove_rsvp_cancel_text'       => __( 'Cancel', 'wired-impact-volunteer-management' ),
     
    191203            'remove_user_rsvp_nonce'        => wp_create_nonce( 'remove_user_rsvp_nonce' ),
    192204            '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' ),
    194206        );
    195207
     
    723735        } else {
    724736
    725             // Set the editor ID
     737            // Set the editor ID, content and options.
    726738            $editor_id      = 'volunteer-email-editor';
    727739            $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 be
    733              * 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/52050
    738              */
    739740            $editor_options = array(
    740741                'media_buttons' => false,
    741742                'textarea_name' => $editor_id,
    742743                'editor_height' => 150,
    743                 'default_editor' => 'html',
    744744            );
    745 
    746745            ?>
    747746
  • wired-impact-volunteer-management/trunk/admin/js/admin.js

    r3004340 r3008933  
    304304        if ( $( email_editor ).exists() ) {
    305305
    306             /**
    307              * Due to a bug in WordPress 5.6+, the wp_editor instance has to be
    308              * 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/52050
    314              */
    315             setTimeout( function() {
    316                 $( '#volunteer-email-editor-tmce' ).click();
    317             }, 1000 );
    318 
    319306            $( '.wivm-send-email' ).on( 'click', function( event ) {
    320307                event.preventDefault();
  • wired-impact-volunteer-management/trunk/cypress/e2e/gravity-forms-integration.cy.js

    r3004340 r3008933  
    55 * - The Wired Impact Volunteer Management plugin is installed.
    66 * - 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.
    88 */
    99describe('Gravity Forms Integration', () => {
     
    1313        cy.deleteSavedPluginSettings();
    1414        cy.createSingleVolunteerOpp();
     15        cy.trashAllGravityFormsForms();
     16        cy.createVolunteerSignupForm();
    1517    });
    1618 
     
    1921    });
    2022
    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() {
    2224
    2325        // The Gravity Forms form should show when the default setting is saved as "Custom Form"
     
    2527        cy.contains('#wivm-tabs a', 'Opportunity Defaults').click();
    2628        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);
    2830        cy.contains('input', 'Save Changes').click();
    2931   
    3032        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');
    3234
    3335        // The Gravity Forms form should show when the volunteer opportunity's setting is saved as "Custom Form"
     
    3739        cy.contains('input', 'Save Changes').click();
    3840   
    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');
    4142        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);
    4344        cy.contains('button','Update').click();
    4445        cy.contains('div', 'Post updated').find('a').click();
    4546   
    46         cy.get('form#gform_' + Cypress.env('gravityFormsSignupFormID')).should('exist');   
     47        cy.get('form#gform_' + this.volunteerSignupFormID).should('exist');   
    4748    });
    4849
    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() {
    50115     
    51116        cy.visit('/wp-admin/plugins.php');
     
    59124
    60125        // 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');
    63127        cy.contains('tr', 'Form Type').find('select option[value="gravity_forms"]').should('not.exist');
    64128        cy.contains('tr', 'Select a Form').should('not.exist');
  • wired-impact-volunteer-management/trunk/cypress/e2e/settings.cy.js

    r3004340 r3008933  
    126126    });
    127127
    128     it('Displays the correct form based on the settings', () => {
     128    it('Displays the correct form based on the settings', function() {
    129129
    130130        // The built-in form should show by default when the plugin is first activated
     
    146146
    147147        // 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');
    149149        cy.contains('tr', 'Form Type').find('select').select('built_in_form');
    150150        cy.contains('button','Update').click();
     
    158158
    159159        // 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');
    161161        cy.contains('tr', 'Form Type').find('select').select('no_form');
    162162        cy.contains('button','Update').click();
  • wired-impact-volunteer-management/trunk/cypress/e2e/volunteer-sign-up.cy.js

    r3004340 r3008933  
    1313    });
    1414
    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() {
    1616
    1717        // Submit the form to sign up as a volunteer
     
    2727        // Save the volunteer opportunity that was created with WP-CLI to ensure all meta is stored
    2828        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');
    3130        cy.contains('button','Update').click();
    3231        cy.contains('div', 'Post updated').should('exist');
  • wired-impact-volunteer-management/trunk/cypress/support/commands.js

    r3004340 r3008933  
    4545
    4646    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    });
    4856});
    4957
     
    6371    cy.exec(Cypress.env('wpCLIPrefix') + ' user delete abraham@usa.gov --yes');
    6472});
     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 */
     80Cypress.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 */
     93Cypress.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  
    463463
    464464    /**
    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 );
    472474
    473475        // 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
    475478            _e( 'Security Check.', 'wired-impact-volunteer-management' );
    476479            die();
     
    478481
    479482        // 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
    481485            _e( 'Security Check.', 'wired-impact-volunteer-management' );
    482486            die();
    483487        }
    484488
    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 ) {
    487514
    488515            // 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 );
    490517
    491518            // 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'] );
    493520
    494521            // If the person hadn't already RSVPed then send out the signup emails.
    495             if ( $rsvp->rsvped == true ) {
     522            if ( $rsvp->rsvped === true ) {
     523
    496524                $email = new WI_Volunteer_Management_Email( $opp, $user );
    497525
     
    499527                $email->send_admin_signup_email();
    500528                $result = 'rsvped';
    501             }
    502             else {
     529
     530            } else {
     531
    503532                $result = 'already_rsvped';
    504533            }
    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
    509536            $result = 'rsvp_closed';
    510537        }
    511538
    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;
    516541    }
    517542
  • wired-impact-volunteer-management/trunk/includes/class-activator.php

    r1728767 r3008933  
    5959     * @since    1.3.3
    6060     */
    61     public static function activate_site(){
     61    public static function activate_site() {
     62
    6263        WI_Volunteer_Management_Public::register_post_types();
    6364        flush_rewrite_rules();
    6465
    65         //Add our volunteer role
     66        // Add our volunteer role.
    6667        add_role(
    67             'volunteer',
    68             __( 'Volunteer', 'wired-impact-volunteer-management' ),
    69             array(
    70                 'read'                  => true,
    71                 'serve_as_volunteer'    => true //Custom capability
    72             )
     68            'volunteer',
     69            __( 'Volunteer', 'wired-impact-volunteer-management' ),
     70            array(
     71                'read'               => true,
     72                'serve_as_volunteer' => true, // Custom capability.
     73            )
    7374        );
    7475
    75         //Add our default options if they don't already exist.
     76        // Add our default options if they don't already exist.
    7677        $options = new WI_Volunteer_Management_Options();
    7778        $options->set_defaults();
  • wired-impact-volunteer-management/trunk/includes/class-gravity-forms.php

    r3004340 r3008933  
    208208            echo apply_filters( 'wivm_sign_up_form_heading', '<h3 class="wivm-form-heading">' . $form_heading_text . '</h3>', $volunteer_opp );
    209209
    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            }
    211218        }
    212219    }
  • wired-impact-volunteer-management/trunk/includes/class-opportunity.php

    r3004340 r3008933  
    9898    /**
    9999     * Display meta information for this opportunity including a heading.
    100      * 
     100     *
    101101     * @param  string $meta_value The meta information to display.
    102102     * @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 = '' ) {
    106106
    107107        if( $meta_value == '' ){
     
    319319    /**
    320320     * Get the number of RSVPs that have taken place for this opportunity.
    321      * 
     321     *
    322322     * @return int The number of RSVPs for this opportunity.
    323323     */
    324     public function get_number_rsvps(){
     324    public function get_number_rsvps() {
     325
    325326        global $wpdb;
    326327
    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        );
    335338
    336339        return $num_rsvps;
     
    359362    /**
    360363     * 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
    365369        $num_rsvps = $this->get_number_rsvps();
    366370
    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
    369374            return false;
    370375        }
    371        
     376
    372377        return true;
    373378    }
  • wired-impact-volunteer-management/trunk/includes/class-volunteer.php

    r1773565 r3008933  
    250250     * Get the admin link to look at this specific volunteer.
    251251     *
    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
    253253     * 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 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 );     
     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 );
    261261    }
    262262
    263263    /**
    264264     * 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 info
    267      * @return int   The user id of the new or updated WordPress user
    268      */
    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'] ),
    274274        );
    275275
    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'] );
    278278        $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';
    284286
    285287            $user_id = wp_insert_user( $userdata );
    286         }
    287         //If the user already exists, update the user based on their email address
    288         else {
     288
     289        } else { // If the user already exists, update the user based on their email address.
     290
    289291            $userdata['ID'] = $existing_user;
    290292
    291293            $user_id = wp_update_user( $userdata );
    292294
    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
    295298                add_user_to_blog( get_current_blog_id(), $userdata['ID'], 'volunteer' );
    296299                update_user_option( $userdata['ID'], 'notes', '' );
     
    298301        }
    299302
    300         //Update custom user meta for new and existing volunteers
    301         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'] ) );
    302305
    303306        $this->ID = $user_id;
  • wired-impact-volunteer-management/trunk/includes/class-wi-volunteer-management.php

    r3004340 r3008933  
    6969
    7070        $this->plugin_name = 'wired-impact-volunteer-management';
    71         $this->version     = '2.0';
     71        $this->version     = '2.1';
    7272
    7373        $this->load_dependencies();
     
    166166         */
    167167        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';
    168173
    169174        $this->loader = new WI_Volunteer_Management_Loader();
     
    246251        $this->loader->add_filter( 'excerpt_more', $plugin_public, 'hide_default_read_more', 11 );
    247252        $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' );
    250255        $this->loader->add_action( 'send_auto_email_reminders', $plugin_public, 'send_email_reminder' );
    251256        $this->loader->add_action( 'widgets_init', $plugin_widget, 'register_widget' );
     
    263268            $this->loader->add_action( 'wivm_show_volunteer_sign_up_form', $gravity_forms, 'show_volunteer_sign_up_form' );
    264269            $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 );
    265271        }
    266272    }
  • wired-impact-volunteer-management/trunk/languages/wired-impact-volunteer-management.pot

    r3004340 r3008933  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Wired Impact Volunteer Management 2.0\n"
     5"Project-Id-Version: Wired Impact Volunteer Management 2.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wired-impact-volunteer-management\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2023-11-30T22:10:44+00:00\n"
     12"POT-Creation-Date: 2023-12-12T16:46:07+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.8.1\n"
     
    1616
    1717#. Plugin Name of the plugin
    18 #: admin/class-admin.php:258
     18#: admin/class-admin.php:270
    1919msgid "Wired Impact Volunteer Management"
    2020msgstr ""
     
    3636msgstr ""
    3737
    38 #. translators: date only format for jQuery UI Datepicker, see http://api.jqueryui.com/datepicker/#utility-formatDate
    39 #: admin/class-admin.php:178
     38#. translators: date only format for jQuery UI Datepicker, see http://api.jqueryui.com/datepicker/#utility-formatDate.
     39#: admin/class-admin.php:190
    4040msgid "D, MM dd, yy"
    4141msgstr ""
    4242
    43 #. translators: time only format for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker
    44 #: admin/class-admin.php:180
     43#. translators: time only format for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker/.
     44#: admin/class-admin.php:192
    4545msgid "h:mm tt"
    4646msgstr ""
    4747
    48 #. translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker
    49 #: admin/class-admin.php:182
     48#. translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker/.
     49#: admin/class-admin.php:194
    5050msgid " @ "
    5151msgstr ""
    5252
    53 #. translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker
    54 #: admin/class-admin.php:183
     53#. translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker/.
     54#: admin/class-admin.php:195
    5555msgid "Are You Sure?"
    5656msgstr ""
    5757
    58 #. translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker
    59 #: admin/class-admin.php:183
     58#. translators: Separator between date and time for jQuery UI Datepicker timepicker, see http://trentrichardson.com/examples/timepicker/.
     59#: admin/class-admin.php:195
    6060msgid "Are you sure you want to remove their RSVP for this opportunity?"
    6161msgstr ""
    6262
    63 #: admin/class-admin.php:184
     63#: admin/class-admin.php:196
    6464msgid "Cancel"
    6565msgstr ""
    6666
    67 #: admin/class-admin.php:185
    68 #: admin/class-admin.php:677
    69 #: admin/class-admin.php:687
    70 #: admin/class-admin.php:703
     67#: admin/class-admin.php:197
     68#: admin/class-admin.php:689
     69#: admin/class-admin.php:699
     70#: admin/class-admin.php:715
    7171#: admin/pages/volunteer.php:92
    7272#: admin/pages/volunteer.php:111
     
    7474msgstr ""
    7575
    76 #: admin/class-admin.php:186
     76#: admin/class-admin.php:198
    7777msgid "Error, try again later."
    7878msgstr ""
    7979
    80 #: admin/class-admin.php:187
     80#: admin/class-admin.php:199
    8181msgid "Error sending the email. Try again later."
    8282msgstr ""
    8383
    84 #: admin/class-admin.php:188
     84#: admin/class-admin.php:200
    8585msgid "Please fill out the email subject."
    8686msgstr ""
    8787
    88 #: admin/class-admin.php:189
     88#: admin/class-admin.php:201
    8989msgid "Please fill out the email content."
    9090msgstr ""
    9191
    92 #: admin/class-admin.php:190
     92#: admin/class-admin.php:202
    9393msgid "Your email has been sent to the volunteers!"
    9494msgstr ""
    9595
    96 #: admin/class-admin.php:214
     96#: admin/class-admin.php:226
    9797#: admin/class-form.php:65
    9898#: admin/pages/volunteers.php:34
     
    100100msgstr ""
    101101
    102 #: admin/class-admin.php:214
    103 #: admin/class-admin.php:236
     102#: admin/class-admin.php:226
     103#: admin/class-admin.php:248
    104104msgid "Help & Settings"
    105105msgstr ""
    106106
    107 #: admin/class-admin.php:215
     107#: admin/class-admin.php:227
    108108#: frontend/class-public.php:127
    109109msgid "Volunteer Mgmt"
    110110msgstr ""
    111111
    112 #: admin/class-admin.php:228
     112#: admin/class-admin.php:240
    113113msgid "Volunteers"
    114114msgstr ""
    115115
    116 #: admin/class-admin.php:244
    117 #: includes/class-activator.php:68
     116#: admin/class-admin.php:256
     117#: includes/class-activator.php:69
    118118msgid "Volunteer"
    119119msgstr ""
    120120
    121 #: admin/class-admin.php:265
     121#: admin/class-admin.php:277
    122122msgid "Opportunities"
    123123msgstr ""
    124124
    125 #: admin/class-admin.php:332
     125#: admin/class-admin.php:344
    126126msgid "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."
    127127msgstr ""
    128128
    129 #: admin/class-admin.php:343
     129#: admin/class-admin.php:355
    130130msgid "Volunteer Opportunity Details"
    131131msgstr ""
    132132
    133 #: admin/class-admin.php:352
     133#: admin/class-admin.php:364
    134134msgid "Volunteer Opportunity RSVPs"
    135135msgstr ""
    136136
    137 #: admin/class-admin.php:361
     137#: admin/class-admin.php:373
    138138msgid "Email Your Volunteers"
    139139msgstr ""
    140140
    141 #: admin/class-admin.php:370
     141#: admin/class-admin.php:382
    142142msgid "Emails Sent to Volunteers"
    143143msgstr ""
    144144
    145 #: admin/class-admin.php:394
     145#: admin/class-admin.php:406
    146146msgid "Contact Information"
    147147msgstr ""
    148148
    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
    153156#: includes/class-wp-volunteer-list-table.php:161
    154157msgid "Name"
    155158msgstr ""
    156159
    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
    159163#: includes/class-wp-volunteer-list-table.php:163
    160164msgid "Phone Number"
    161165msgstr ""
    162166
    163 #: admin/class-admin.php:408
     167#: admin/class-admin.php:420
    164168#: admin/pages/help-settings.php:34
     169#: includes/class-gravity-forms-feed-addon.php:144
    165170msgid "Email"
    166171msgstr ""
    167172
    168 #: admin/class-admin.php:414
     173#: admin/class-admin.php:426
    169174msgid "Location Information"
    170175msgstr ""
    171176
    172 #: admin/class-admin.php:418
     177#: admin/class-admin.php:430
    173178msgid "Location Name"
    174179msgstr ""
    175180
    176 #: admin/class-admin.php:423
     181#: admin/class-admin.php:435
    177182msgid "Street Address"
    178183msgstr ""
    179184
    180 #: admin/class-admin.php:428
     185#: admin/class-admin.php:440
    181186msgid "City"
    182187msgstr ""
    183188
    184 #: admin/class-admin.php:433
     189#: admin/class-admin.php:445
    185190msgid "State"
    186191msgstr ""
    187192
    188 #: admin/class-admin.php:438
     193#: admin/class-admin.php:450
    189194msgid "Zip"
    190195msgstr ""
    191196
    192 #: admin/class-admin.php:444
     197#: admin/class-admin.php:456
    193198msgid "Date and Time"
    194199msgstr ""
    195200
    196 #: admin/class-admin.php:448
     201#: admin/class-admin.php:460
    197202msgid "One-Time Opportunity?"
    198203msgstr ""
    199204
    200 #: admin/class-admin.php:451
     205#: admin/class-admin.php:463
    201206msgid "This is a one-time opportunity at a fixed date and time."
    202207msgstr ""
    203208
    204 #: admin/class-admin.php:457
     209#: admin/class-admin.php:469
    205210msgid "Start Date & Time"
    206211msgstr ""
    207212
    208 #: admin/class-admin.php:465
     213#: admin/class-admin.php:477
    209214msgid "End Date & Time"
    210215msgstr ""
    211216
    212 #: admin/class-admin.php:469
     217#: admin/class-admin.php:481
    213218msgid "Whoops, it looks like you set your event to end before it started."
    214219msgstr ""
    215220
    216 #: admin/class-admin.php:474
     221#: admin/class-admin.php:486
    217222msgid "When Will This Event Happen?"
    218223msgstr ""
    219224
    220 #: admin/class-admin.php:475
     225#: admin/class-admin.php:487
    221226msgid "On your own time, All summer, etc."
    222227msgstr ""
    223228
    224 #: admin/class-admin.php:479
     229#: admin/class-admin.php:491
    225230msgid "Volunteer Limit"
    226231msgstr ""
    227232
    228 #: admin/class-admin.php:483
     233#: admin/class-admin.php:495
    229234msgid "Is There a Volunteer Limit?"
    230235msgstr ""
    231236
    232 #: admin/class-admin.php:486
     237#: admin/class-admin.php:498
    233238msgid "Only a fixed number of people can participate in this volunteer opportunity."
    234239msgstr ""
    235240
    236 #: admin/class-admin.php:492
     241#: admin/class-admin.php:504
    237242msgid "Max Number of Volunteers"
    238243msgstr ""
    239244
    240 #: admin/class-admin.php:497
     245#: admin/class-admin.php:509
    241246msgid "Volunteer Signup Form"
    242247msgstr ""
    243248
    244 #: admin/class-admin.php:501
     249#: admin/class-admin.php:513
    245250msgid "The built-in signup form includes name, email and phone number fields. It can't be modified."
    246251msgstr ""
    247252
    248 #: admin/class-admin.php:505
     253#: admin/class-admin.php:517
    249254msgid "Form Type"
    250255msgstr ""
    251256
    252 #: admin/class-admin.php:533
     257#: admin/class-admin.php:545
    253258#: admin/pages/help-settings.php:91
    254259msgid "No Form"
    255260msgstr ""
    256261
    257 #: admin/class-admin.php:534
     262#: admin/class-admin.php:546
    258263#: admin/pages/help-settings.php:92
    259264msgid "Built-In Signup Form"
    260265msgstr ""
    261266
    262 #: admin/class-admin.php:667
     267#: admin/class-admin.php:679
    263268msgid "Number of Open Spots: %s"
    264269msgstr ""
    265270
    266 #: admin/class-admin.php:668
     271#: admin/class-admin.php:680
    267272msgid "Number RSVPed: %d"
    268273msgstr ""
    269274
    270 #: admin/class-admin.php:675
    271 #: admin/class-admin.php:685
    272 #: admin/class-admin.php:701
     275#: admin/class-admin.php:687
     276#: admin/class-admin.php:697
     277#: admin/class-admin.php:713
    273278#: includes/class-wp-volunteer-list-table.php:162
    274279msgid "E-mail"
    275280msgstr ""
    276281
    277 #: admin/class-admin.php:676
    278 #: admin/class-admin.php:686
    279 #: admin/class-admin.php:702
     282#: admin/class-admin.php:688
     283#: admin/class-admin.php:698
     284#: admin/class-admin.php:714
    280285msgid "Phone"
    281286msgstr ""
    282287
    283 #: admin/class-admin.php:693
     288#: admin/class-admin.php:705
    284289msgid "No one has signed up for this opportunity yet."
    285290msgstr ""
    286291
    287 #: admin/class-admin.php:722
     292#: admin/class-admin.php:734
    288293msgid "No one has signed up for this opportunity, so you can't send any emails yet."
    289294msgstr ""
    290295
    291 #: admin/class-admin.php:751
     296#: admin/class-admin.php:750
    292297msgid "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."
    293298msgstr ""
    294299
    295 #: admin/class-admin.php:753
     300#: admin/class-admin.php:752
    296301msgid "Email Subject"
    297302msgstr ""
    298303
    299 #: admin/class-admin.php:760
     304#: admin/class-admin.php:759
    300305msgid "Send Email"
    301306msgstr ""
    302307
    303 #: admin/class-admin.php:788
    304 #: admin/class-admin.php:1118
    305 #: admin/class-admin.php:1252
    306 #: frontend/class-public.php:475
    307 #: frontend/class-public.php:481
     308#: 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
    308313msgid "Security Check."
    309314msgstr ""
    310315
    311 #: admin/class-admin.php:823
     316#: admin/class-admin.php:822
    312317msgctxt "email count"
    313318msgid "<p>1 email has been sent.</p>"
     
    316321msgstr[1] ""
    317322
     323#: admin/class-admin.php:829
     324#: admin/class-admin.php:924
     325msgid "When"
     326msgstr ""
     327
    318328#: admin/class-admin.php:830
    319 #: admin/class-admin.php:925
    320 msgid "When"
    321 msgstr ""
    322 
    323 #: admin/class-admin.php:831
    324329msgid "Sender"
    325330msgstr ""
    326331
    327 #: admin/class-admin.php:840
     332#: admin/class-admin.php:839
    328333msgid "Automated Reminder Email"
    329334msgstr ""
    330335
    331336#. translators: date and time format for mysql2date() function, see http://php.net/manual/en/function.date.php
    332 #: admin/class-admin.php:847
     337#: admin/class-admin.php:846
    333338msgid "D, M j, Y \\&#64; g:i a"
    334339msgstr ""
    335340
    336 #: admin/class-admin.php:864
     341#: admin/class-admin.php:863
    337342msgid "No emails have been sent yet. We'll list them here when we send automated reminders and when you send custom emails to volunteers."
    338343msgstr ""
    339344
    340 #: admin/class-admin.php:881
     345#: admin/class-admin.php:880
    341346msgid "Please enter your phone number in the format (000) 000-0000."
    342347msgstr ""
    343348
    344 #: admin/class-admin.php:885
     349#: admin/class-admin.php:884
    345350#: admin/pages/volunteer.php:39
    346351msgid "Notes"
    347352msgstr ""
    348353
    349 #: admin/class-admin.php:888
     354#: admin/class-admin.php:887
    350355msgid "Please enter any notes about this user."
    351356msgstr ""
    352357
     358#: admin/class-admin.php:922
     359msgid "Title"
     360msgstr ""
     361
    353362#: admin/class-admin.php:923
    354 msgid "Title"
    355 msgstr ""
    356 
    357 #: admin/class-admin.php:924
    358363msgid "Location"
    359364msgstr ""
    360365
     366#: admin/class-admin.php:925
     367msgid "Number of RSVPs"
     368msgstr ""
     369
    361370#: admin/class-admin.php:926
    362 msgid "Number of RSVPs"
    363 msgstr ""
    364 
    365 #: admin/class-admin.php:927
    366371msgid "Number of Open Spots"
    367372msgstr ""
    368373
    369 #: admin/class-admin.php:1053
     374#: admin/class-admin.php:1052
    370375msgid "All Opportunities"
    371376msgstr ""
    372377
    373 #: admin/class-admin.php:1058
     378#: admin/class-admin.php:1057
    374379msgid "Upcoming One-time Opportunities"
    375380msgstr ""
    376381
    377 #: admin/class-admin.php:1063
     382#: admin/class-admin.php:1062
    378383msgid "Past One-time Opportunities"
    379384msgstr ""
    380385
    381 #: admin/class-admin.php:1068
     386#: admin/class-admin.php:1067
    382387msgid "Flexible Opportunities"
    383388msgstr ""
     
    689694msgstr ""
    690695
     696#: includes/class-gravity-forms-feed-addon.php:101
     697msgid "Volunteer Management Feed Settings"
     698msgstr ""
     699
     700#: includes/class-gravity-forms-feed-addon.php:110
     701msgid "Enter a name to uniquely identify this feed."
     702msgstr ""
     703
     704#: includes/class-gravity-forms-feed-addon.php:118
     705#: includes/class-gravity-forms-feed-addon.php:150
     706msgid "Map Fields"
     707msgstr ""
     708
     709#: includes/class-gravity-forms-feed-addon.php:123
     710msgid "First Name"
     711msgstr ""
     712
     713#: includes/class-gravity-forms-feed-addon.php:130
     714msgid "Last Name"
     715msgstr ""
     716
     717#: includes/class-gravity-forms-feed-addon.php:150
     718msgid "Match the information needed for the volunteer management system with fields from your form."
     719msgstr ""
     720
     721#: includes/class-gravity-forms-feed-addon.php:156
     722#: includes/class-gravity-forms-feed-addon.php:158
     723msgid "Conditional Logic"
     724msgstr ""
     725
     726#: includes/class-gravity-forms-feed-addon.php:158
     727msgid "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."
     728msgstr ""
     729
     730#: includes/class-gravity-forms-feed-addon.php:227
     731msgid "This field is required."
     732msgstr ""
     733
     734#: includes/class-gravity-forms-feed-addon.php:277
     735#: templates/opp-single-form.php:24
     736msgid "We're sorry, but we weren't able to sign you up. We have no more open spots."
     737msgstr ""
     738
     739#: includes/class-gravity-forms-feed-addon.php:309
     740msgid "Error Sending Data to the Volunteer Management System: The volunteer opportunity's ID was not provided correctly."
     741msgstr ""
     742
     743#: includes/class-gravity-forms-feed-addon.php:325
     744msgid "Error Sending Data to the Volunteer Management System: The volunteer has already signed up for this opportunity."
     745msgstr ""
     746
     747#: includes/class-gravity-forms-feed-addon.php:336
     748msgid "The volunteer successfully signed up for this opportunity."
     749msgstr ""
     750
    691751#: includes/class-gravity-forms.php:58
    692752msgid "Custom Form"
     
    713773#: templates/opp-single-form.php:15
    714774msgid "Express Interest in Volunteering"
     775msgstr ""
     776
     777#: includes/class-gravity-forms.php:216
     778#: templates/opp-single-form.php:55
     779msgid "We're sorry, but we're no longer accepting new volunteers for this opportunity."
    715780msgstr ""
    716781
     
    800865msgstr ""
    801866
    802 #: templates/opp-single-form.php:24
    803 msgid "We're sorry, but we weren't able to sign you up. We have no more open spots."
    804 msgstr ""
    805 
    806867#: templates/opp-single-form.php:25
    807868msgid "Please fill in every field and make sure you entered a valid email address."
     
    830891#: templates/opp-single-form.php:52
    831892msgid "Express Interest"
    832 msgstr ""
    833 
    834 #: templates/opp-single-form.php:55
    835 msgid "We're sorry, but we're no longer accepting new volunteers for this opportunity."
    836893msgstr ""
    837894
  • wired-impact-volunteer-management/trunk/wivm.php

    r3004340 r3008933  
    1717 * Plugin URI:        https://wiredimpact.com/wordpress-plugins-for-nonprofits/volunteer-management/
    1818 * Description:       A simple, free way to keep track of your nonprofit’s volunteers and opportunities.
    19  * Version:           2.0
     19 * Version:           2.1
    2020 * Author:            Wired Impact
    2121 * Author URI:        https://wiredimpact.com
Note: See TracChangeset for help on using the changeset viewer.