<?php

do_action('bp_before_group_request_membership_content');
?>

<?php 
if (!bp_group_has_requested_membership()) {
    ?>
	<p><?php 
    printf(__("You are requesting to become a member of the group '%s'.", "buddypress"), bp_get_group_name(false));
    ?>
</p>

	<form action="<?php 
    bp_group_form_action('request-membership');
    ?>
" method="post" name="request-membership-form" id="request-membership-form" class="standard-form">
		<label for="group-request-membership-comments"><?php 
    _e('Comments (optional)', 'buddypress');
    ?>
</label>
		<textarea name="group-request-membership-comments" id="group-request-membership-comments"></textarea>

		<?php 
    do_action('bp_group_request_membership_content');
    ?>

		<p><input type="submit" name="group-request-send" id="group-request-send" value="<?php 
    _e('Send Request', 'buddypress');
    ?>
 &rarr;" />
				
			</div>
			
		<?php 
        }
        ?>

		<div class="info-group">
			
			<h4><?php 
        _e('Group Members', 'buddypress');
        ?>
</h4>
		
			<form action="<?php 
        bp_group_form_action('members');
        ?>
" method="post" id="group-members-form">
			<?php 
        if (bp_group_has_members()) {
            ?>
			
				<?php 
            if (bp_group_member_needs_pagination()) {
                ?>
					
					<div id="member-count" class="pag-count">
						<?php 
                bp_group_member_pagination_count();
                ?>
					</div>