Manage Pledge: Allow pledge admins to change email (#113)

* Add the admin email field to the manage form
* Fix admin email processing: When the email is changed, the pledge needs to be set back to pending, until the email is re-confirmed
* Send confirmation emails for existing pledges to the "Manage Pledge" page
* Process the email confirmation & resending emails actions on both shortcodes
* Add a message for unconfirmed pledges
This commit is contained in:
Kelly Dwan 2019-11-26 15:37:19 -05:00 committed by GitHub
parent 544fe39199
commit 80b88399ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 139 additions and 65 deletions

View file

@ -25,9 +25,16 @@ use WP_Post;
aria-describedby="5ftf-pledge-email-help"
<?php echo $readonly ? 'readonly' : ''; ?>
/>
<p id="5ftf-pledge-email-help">
<?php esc_html_e( 'This address will be used to confirm your organizations contribution profile, and later manage any changes. Please make sure that its a group address (e.g., wp-contributors@example.com) so that it persists across employee transitions.', 'wporg-5ftf' ); ?>
</p>
<div id="5ftf-pledge-email-help">
<p>
<?php esc_html_e( 'This address will be used to confirm your organizations contribution profile, and later manage any changes. Please make sure that its a group address (e.g., wp-contributors@example.com) so that it persists across employee transitions.', 'wporg-5ftf' ); ?>
</p>
<?php if ( ! empty( $data['org-pledge-email'] ) ) : ?>
<p>
<?php esc_html_e( 'If you change this email, you will need to confirm the new email. Your pledge will be unpublished until the new email is confirmed.', 'wporg-5ftf' ); ?>
</p>
<?php endif; ?>
</div>
<?php if ( is_admin() ) : ?>
<?php if ( $data['pledge-email-confirmed'] ) : ?>