mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-05 10:25:45 +03:00
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:
parent
544fe39199
commit
80b88399ae
6 changed files with 139 additions and 65 deletions
|
@ -4,8 +4,9 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
|
|||
use WP_Post;
|
||||
|
||||
/**
|
||||
* @var bool $email_confirmed
|
||||
* @var string $directory_url
|
||||
* @var bool $email_confirmed
|
||||
* @var bool $is_new_pledge
|
||||
* @var int $pledge_id
|
||||
* @var WP_Post|null $pledge
|
||||
*/
|
||||
|
@ -16,10 +17,17 @@ use WP_Post;
|
|||
<div class="notice notice-success notice-alt">
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
wp_kses_post( __( 'Thank you for confirming your address! We’ve emailed confirmation links to the contributors you mentioned, and your pledge will show up in <a href=\"%s\">the directory</a> once one contributor confirms their participation.', 'wporg-5ftf' ) ),
|
||||
esc_url( $directory_url )
|
||||
);
|
||||
if ( $is_new_pledge ) {
|
||||
printf(
|
||||
wp_kses_post( __( 'Thank you for confirming your address! We’ve emailed confirmation links to the contributors you mentioned, and your pledge will show up in <a href=\"%s\">the directory</a> once one contributor confirms their participation.', 'wporg-5ftf' ) ),
|
||||
esc_url( $directory_url )
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
wp_kses_post( __( 'Thank you for confirming your address! If you have confirmed contributors, your pledge is visible in <a href=\"%s\">the directory</a> again. Otherwise, your pledge wiill show up once one contributor confirms their participation.', 'wporg-5ftf' ) ),
|
||||
esc_url( $directory_url )
|
||||
);
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
|
||||
|
@ -54,11 +62,11 @@ use WP_Post;
|
|||
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="pledge_id" value="<?php echo esc_attr( $pledge_id ); ?>" />
|
||||
<input type="hidden" name="action" value="resend_pledge_confirmation" />
|
||||
|
||||
<p>
|
||||
<input
|
||||
type="submit"
|
||||
name="resend_pledge_confirmation"
|
||||
value="Resend Confirmation"
|
||||
/>
|
||||
</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue