mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-06 02:45:43 +03:00
Pledge Management: Add "request link" form to the manage pledge (#126)
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
This commit is contained in:
parent
a5d4228c6d
commit
a91c2733d2
8 changed files with 129 additions and 76 deletions
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace WordPressDotOrg\FiveForTheFuture\View;
|
||||
use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
||||
|
||||
defined( 'WPINC' ) || die();
|
||||
|
||||
|
@ -16,30 +17,7 @@ defined( 'WPINC' ) || die();
|
|||
<?php esc_html_e( "If you're the admin, enter your email address and a confirmation link will be sent to you.", 'wporg-5ftf' ); ?>
|
||||
</p>
|
||||
|
||||
<form method="post">
|
||||
<input type="hidden" name="pledge_id" value="<?php echo esc_attr( get_post()->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>
|
||||
<?php require get_views_path() . 'form-request-manage-link.php'; ?>
|
||||
<button type="button" class="button button-link pledge-dialog__close" aria-label="Close"><span class="dashicons dashicons-no-alt" aria-hidden="true"></span></button></div>
|
||||
</div>
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue