five-for-the-future/plugins/wporg-5ftf/views/form-pledge-manage.php
Kelly Dwan 619af97bd1
Forms: Use button class directly on buttons for consistent display
Adding the `button` mixin into `input[type="submit"] caused conflicts with the other button classes (`.button-primary`) due to specificity. The button classes should be used on all buttons instead. This also updates which button on the Manage Pledge form is the "primary" action, since it's easy to skip the Update button when it's not primary.
2019-12-09 11:15:39 -05:00

46 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"
class="button button-primary"
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; ?>