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:
Kelly Dwan 2019-12-11 16:12:23 -05:00 committed by GitHub
parent a5d4228c6d
commit a91c2733d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 129 additions and 76 deletions

View file

@ -178,10 +178,7 @@ function can_manage_pledge( $requested_pledge_id, $auth_token = '' ) {
return new WP_Error(
'invalid_token',
sprintf(
__( 'Your link has expired, please <a href="%s">obtain a new one.</a>', 'wporg-5ftf' ),
get_permalink( $requested_pledge_id )
)
__( 'Your link has expired.', 'wporg-5ftf' )
);
}