five-for-the-future/plugins/wporg-5ftf/views/inputs-pledge-new-misc.php
Corey McKrill 9c08692d5d
New Pledge: Validate submitted form values and generate a draft pledge post (#35)
Ensures that a submission to the new pledge form has:

* A unique email address compared to existing pledges
* A unique domain in the URL, compared to existing pledges
* Has at least one valid contributor listed

Error messages when one or more of these conditions isn't met are descriptive so that the submitter can correct the issue.

Fixes #15
2019-10-18 16:56:21 -07:00

24 lines
491 B
PHP

<?php
namespace WordPressDotOrg\FiveForTheFuture\View;
/** @var array $data */
/** @var bool $readonly */
?>
<div class="form-field form-field__agree">
<p>
<!-- Statement of agreement to pledge, link to further info maybe? -->
</p>
<input
type="checkbox"
id="5ftf-pledge-agreement"
name="pledge-agreement"
required
<?php checked( $data['pledge-agreement'] ); ?>
/>
<label for="5ftf-pledge-agreement">
<?php esc_html_e( 'I agree', 'wordpressorg' ); ?>
</label>
</div>