mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-21 02:23:43 +03:00

When a pledge is selected but the auth token is missing/incorrect, show the email form. Like on the pledge page, submitting the correct email will trigger a new auth token + link to be emailed to the pledge manager. This makes for a clearer path for re-requesting a valid link. Fixes #114
35 lines
764 B
PHP
35 lines
764 B
PHP
<?php
|
|
|
|
namespace WordPressDotOrg\FiveForTheFuture\View;
|
|
use WordPressDotOrg\FiveForTheFuture\Pledge;
|
|
|
|
defined( 'WPINC' ) || die();
|
|
|
|
$pledge_id = ( Pledge\CPT_ID === get_post_type() ) ? get_post()->ID : absint( $_REQUEST['pledge_id'] ?? 0 );
|
|
?>
|
|
|
|
<form method="post" class="pledge-email-form">
|
|
<input type="hidden" name="pledge_id" value="<?php echo esc_attr( $pledge_id ); ?>" />
|
|
|
|
<label for="pledge_admin_address">
|
|
<?php esc_html_e( 'Email Address', 'wporg-5ftf' ); ?>
|
|
</label>
|
|
|
|
<input
|
|
id="pledge_admin_address"
|
|
name="pledge_admin_address"
|
|
type="email"
|
|
required
|
|
value=""
|
|
/>
|
|
|
|
<div class="message"></div>
|
|
|
|
<input
|
|
type="submit"
|
|
class="button"
|
|
name="get_manage_pledge_link"
|
|
value="<?php esc_attr_e( 'Submit', 'wporg-5ftf' ); ?>"
|
|
/>
|
|
</form>
|