five-for-the-future/plugins/wporg-5ftf/views/form-pledge-manage.php
Kelly Dwan 80b88399ae
Manage Pledge: Allow pledge admins to change email (#113)
* Add the admin email field to the manage form
* Fix admin email processing: When the email is changed, the pledge needs to be set back to pending, until the email is re-confirmed
* Send confirmation emails for existing pledges to the "Manage Pledge" page
* Process the email confirmation & resending emails actions on both shortcodes
* Add a message for unconfirmed pledges
2019-11-26 15:37:19 -05:00

45 lines
1.1 KiB
PHP

<?php
namespace WordPressDotOrg\FiveForTheFuture\View;
use function WordPressDotOrg\FiveForTheFuture\get_views_path;
/**
* @var bool $can_view_form
* @var int $pledge_id
* @var string $auth_token
*/
require __DIR__ . '/partial-result-messages.php';
?>
<?php if ( true === $can_view_form ) : ?>
<form class="pledge-form" id="5ftf-form-pledge-manage" action="" method="post" enctype="multipart/form-data">
<input type="hidden" name="pledge_id" value="<?php echo absint( $pledge_id ); ?>" />
<input type="hidden" name="auth_token" value="<?php echo esc_attr( $auth_token ); ?>" />
<?php
wp_nonce_field( 'manage_pledge_' . $pledge_id );
require get_views_path() . 'inputs-pledge-org-info.php';
require get_views_path() . 'inputs-pledge-org-email.php';
?>
<div>
<input
type="submit"
id="5ftf-pledge-submit"
name="action"
value="<?php esc_attr_e( 'Update Pledge', 'wporg-5ftf' ); ?>"
/>
</div>
<h2><?php esc_html_e( 'Contributors', 'wporg-5ftf' ); ?></h2>
<?php require get_views_path() . 'manage-contributors.php'; ?>
</form>
<?php endif; ?>