Hide the "resend confirmation" button on draft pledges

The confirmation hasn't been sent in the first place, so this button is misleading
This commit is contained in:
Kelly Dwan 2019-11-14 14:36:45 -05:00
parent d0dc2f0a14
commit 531e71a552
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
2 changed files with 7 additions and 3 deletions

View file

@ -52,6 +52,10 @@
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
} }
.pledge-contributors.pledge-status__draft .resend-confirm {
display: none;
}
.contributor-list th, .contributor-list th,
.contributor-list td, .contributor-list td,
.contributor-list th *, .contributor-list th *,

View file

@ -26,7 +26,7 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
<thead> <thead>
<tr> <tr>
<th scope="col"><?php esc_html_e( 'Contributor', 'wporg-5ftf' ); ?></th> <th scope="col"><?php esc_html_e( 'Contributor', 'wporg-5ftf' ); ?></th>
<th scope="col"><?php esc_html_e( 'Resend Confirmation', 'wporg-5ftf' ); ?></th> <th scope="col" class="resend-confirm"><?php esc_html_e( 'Resend Confirmation', 'wporg-5ftf' ); ?></th>
<th scope="col"><?php esc_html_e( 'Remove Contributor', 'wporg-5ftf' ); ?></th> <th scope="col"><?php esc_html_e( 'Remove Contributor', 'wporg-5ftf' ); ?></th>
</tr> </tr>
</thead> </thead>
@ -47,7 +47,7 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
</span> </span>
</th> </th>
<# if ( 'pending' === data.status ) { #> <# if ( 'pending' === data.status ) { #>
<td> <td class="resend-confirm">
<button <button
class="button" class="button"
data-action="resend-contributor-confirmation" data-action="resend-contributor-confirmation"
@ -75,7 +75,7 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
</script> </script>
<div id="5ftf-contributors"> <div id="5ftf-contributors">
<div class="pledge-contributors"> <div class="pledge-contributors pledge-status__<?php echo esc_attr( get_post_status() ); ?>">
<?php if ( ! empty( $contributors ) ) : ?> <?php if ( ! empty( $contributors ) ) : ?>
<?php <?php
printf( printf(