mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-13 05:45:47 +03:00
Enable Manage Form functionality
This commit is contained in:
parent
60fd0d2fb3
commit
8b4d55782d
4 changed files with 152 additions and 63 deletions
|
@ -1,25 +1,38 @@
|
|||
<?php
|
||||
namespace WordPressDotOrg\FiveForTheFuture\View;
|
||||
|
||||
namespace WordPressDotOrg\FiveForTheFuture\View;
|
||||
use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
||||
|
||||
/** @var array $messages */
|
||||
/** @var bool $updated */
|
||||
/**
|
||||
* @var bool $can_view_form
|
||||
* @var int $pledge_id
|
||||
* @var string $auth_token
|
||||
*/
|
||||
|
||||
require __DIR__ . '/partial-result-messages.php';
|
||||
|
||||
?>
|
||||
|
||||
<form class="pledge-form" id="5ftf-form-pledge-manage" action="" method="post" enctype="multipart/form-data">
|
||||
<?php
|
||||
require get_views_path() . 'inputs-pledge-org-info.php';
|
||||
require get_views_path() . 'manage-contributors.php';
|
||||
require get_views_path() . 'inputs-pledge-org-email.php';
|
||||
?>
|
||||
<?php if ( true === $can_view_form ) : ?>
|
||||
|
||||
<div>
|
||||
<input
|
||||
type="submit"
|
||||
id="5ftf-pledge-submit"
|
||||
name="action"
|
||||
value="<?php esc_attr_e( 'Update Pledge', 'wporg-5ftf' ); ?>"
|
||||
/>
|
||||
</div>
|
||||
</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; ?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue