Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/02/2018 04:46:28 PM (9 years ago)
Author:
imath
Message:

BP Nouveau: always include an invite screen to the Group create steps

As the Group Invites UI allows to invite friends or regular members, the Group create steps will include an invites screen even if the Friends component is not active.

Props hnla

Fixes #7781

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/groups/template-tags.php

    r12008 r12039  
    357357                                }
    358358                        }
    359 
    360                         wp_nonce_field( $core_screen['nonce'] );
    361359                }
    362360        }
    … …  
    414412        }
    415413
     414        /**
     415         * Avoid nested forms with the Backbone views for the group invites step.
     416         */
     417        if ( 'group-invites' === bp_get_groups_current_create_step() ) {
     418                printf(
     419                        '<form action="%s" method="post" enctype="multipart/form-data">',
     420                        bp_get_group_creation_form_action()
     421                );
     422        }
     423
     424        if ( ! empty( $core_screen['nonce'] ) ) {
     425                wp_nonce_field( $core_screen['nonce'] );
     426        }
     427
    416428        printf(
    417429                '<input type="hidden" name="group-id" id="group-id" value="%s" />',
    … …  
    437449                 */
    438450                do_action( 'bp_directory_groups_content' );
     451        }
     452
     453        /**
     454         * Avoid nested forms with the Backbone views for the group invites step.
     455         */
     456        if ( 'group-invites' === bp_get_groups_current_create_step() ) {
     457                echo '</form>';
    439458        }
    440459}
Note: See TracChangeset for help on using the changeset viewer.