Contributors: Add ability to resend confirmation email.

Fixes: #50.
This commit is contained in:
Ian Dunn 2019-10-26 10:59:06 -07:00
parent 62f5335b51
commit c10699f97c
No known key found for this signature in database
GPG key ID: 99B971B50343CBCB
3 changed files with 20 additions and 7 deletions

View file

@ -31,15 +31,19 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
<?php echo get_avatar( $contributor->user_email, 32 ); ?>
<?php echo esc_html( $contributor_post->post_title ); ?>
<!-- TODO These buttons don't do anything yet.
<button class="button-primary" data-action="remove" data-contributor-post="<?php echo esc_attr( $contributor_post->ID ); ?>">
<button class="button-primary" data-action="remove-contributor" data-contributor-post="<?php echo esc_attr( $contributor_post->ID ); ?>">
<?php esc_html_e( 'Remove', 'wporg' ); ?>
</button>
<?php if ( 'pending' === $contributor_post->post_status ) : ?>
<button class="button-secondary" data-action="resend-confirmation" data-contributor-post="<?php echo esc_attr( $contributor_post->ID ); ?>">
<?php esc_html_e( 'Resend confirmation', 'wporg' ); ?>
</button>
<?php endif; ?>
-->
<?php if ( 'pending' === $contributor_post->post_status ) : ?>
<?php submit_button(
'Resend Confirmation',
'secondary',
'resend-contributor-confirmation',
false,
array( 'formaction' => add_query_arg( 'resend-contributor-id', $contributor_post->ID ) )
); ?>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>