mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-04 10:05: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
24
plugins/wporg-5ftf/views/partial-request-manage-link.php
Normal file
24
plugins/wporg-5ftf/views/partial-request-manage-link.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace WordPressDotOrg\FiveForTheFuture\View;
|
||||
use const WordPressDotOrg\FiveForTheFuture\Pledge\CPT_ID;
|
||||
use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
||||
|
||||
defined( 'WPINC' ) || die();
|
||||
|
||||
$pledge_id = ( CPT_ID === get_post_type() ) ? get_post()->ID : absint( $_REQUEST['pledge_id'] ?? 0 );
|
||||
$pledge_name = get_the_title( $pledge_id );
|
||||
?>
|
||||
|
||||
<div id="send-link-dialog">
|
||||
<?php require get_views_path() . 'partial-result-messages.php'; ?>
|
||||
|
||||
<p>
|
||||
<?php echo esc_html( sprintf(
|
||||
__( "If you're an admin for %s, you can request a new edit link using this form. Enter your email address and we'll send you a new link.", 'wporg-5ftf' ),
|
||||
$pledge_name
|
||||
) ); ?>
|
||||
</p>
|
||||
|
||||
<?php require get_views_path() . 'form-request-manage-link.php'; ?>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue