mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-15 23:05:44 +03:00
Email: Send pledge confirmation with authentication token. (#46)
Email: Send pledge confirmation with authentication token. Fixes #34. Fixes #10.
This commit is contained in:
parent
284e616c84
commit
5ffca9420f
8 changed files with 496 additions and 7 deletions
42
plugins/wporg-5ftf/views/form-pledge-confirm-email.php
Executable file
42
plugins/wporg-5ftf/views/form-pledge-confirm-email.php
Executable file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace WordPressDotOrg\FiveForTheFuture\View;
|
||||
|
||||
/**
|
||||
* @var bool $email_confirmed
|
||||
* @var string $directory_url
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php if ( true === $email_confirmed ) : ?>
|
||||
|
||||
<div class="notice notice-success notice-alt">
|
||||
<p>
|
||||
Thank you for confirming your address! We've emailed confirmation links to your contributors, and your pledge will show up in <a href="<?php echo esc_url( $directory_url ); ?>">the directory</a> once one of them confirms their participation.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<div class="notice notice-error notice-alt">
|
||||
<p>
|
||||
<?php
|
||||
/*
|
||||
* There could be other reasons it failed, like an invalid token, but this is the most common reason,
|
||||
* and the only one that normal users should experience, so we're assuming it in order to provide
|
||||
* the best UX.
|
||||
*/
|
||||
?>
|
||||
Your confirmation link has expired, please obtain a new one:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button class="button-secondary">
|
||||
<?php esc_html_e( 'Resend confirmation email', 'wporg' ); ?>
|
||||
<?php // todo make ^ work when making the other 2 work ?>
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
|
@ -30,7 +30,7 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
|||
<?php if ( true === $complete ) : ?>
|
||||
|
||||
<div class="notice notice-success notice-alt">
|
||||
<p><?php esc_html_e( 'Thanks for pledging to Five for the Future! Your new pledge profile has been created, and we’ve emailed you a link to confirm your address. Your contributors have also been emailed a link to confirm their participation with your organization.', 'wporg' ); ?></p>
|
||||
<p><?php esc_html_e( "Thanks for pledging to Five for the Future! Your new pledge profile has been created, and we’ve emailed you a link to confirm your address. Once that's done, we'll also email confirmation links to your contributors.", 'wporg' ); ?></p>
|
||||
|
||||
<p>
|
||||
<?php echo wp_kses_post( sprintf(
|
||||
|
@ -42,6 +42,9 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
|||
<p>
|
||||
<?php echo wp_kses_post(
|
||||
__( 'Do you want to hire additional employees to contribute to WordPress? <a href="https://jobs.wordpress.net">Post a job listing on jobs.wordpress.net</a>.', 'wporg' )
|
||||
// todo ask mel about moving this outside the `notice-success`, since it's not really part of the success notification, and distracts from it.
|
||||
// many users have notification fatigue and no longer trust them or pay attention to them, because they're so often misused for non-critical information,
|
||||
// and the jobs thing is more of an "ad" in this context than something directly related to the process the user wants to complete
|
||||
); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue