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

* Fix issue with fetching data in `get_pledge_meta` when no submission has been POST'd * Rename to `subset`, since `context` is also used elsewhere * Show form content when there are form errors * Fix warnings on new pledge form * Skip wpautop before save, so editors don’t need to edit HTML unless they want to
39 lines
913 B
PHP
39 lines
913 B
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';
|
|
?>
|
|
|
|
<div>
|
|
<input
|
|
type="submit"
|
|
id="5ftf-pledge-submit"
|
|
name="action"
|
|
value="<?php esc_attr_e( 'Update Pledge', 'wporg-5ftf' ); ?>"
|
|
/>
|
|
</div>
|
|
</form>
|
|
|
|
<?php endif; ?>
|