mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-07 19:25:44 +03:00
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
This commit is contained in:
parent
78822c4323
commit
9c08692d5d
4 changed files with 202 additions and 55 deletions
|
@ -12,11 +12,12 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
|
|||
|
||||
<input
|
||||
type="checkbox"
|
||||
id="5ftf-pledge-agree"
|
||||
name="pledge-agree"
|
||||
id="5ftf-pledge-agreement"
|
||||
name="pledge-agreement"
|
||||
required
|
||||
<?php checked( $data['pledge-agreement'] ); ?>
|
||||
/>
|
||||
<label for="5ftf-pledge-agree">
|
||||
<label for="5ftf-pledge-agreement">
|
||||
<?php esc_html_e( 'I agree', 'wordpressorg' ); ?>
|
||||
</label>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue