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

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
35 lines
742 B
PHP
35 lines
742 B
PHP
<?php
|
|
namespace WordPressDotOrg\FiveForTheFuture\View;
|
|
|
|
/** @var array $contributors */
|
|
/** @var array $data */
|
|
/** @var bool $readonly */
|
|
?>
|
|
|
|
<?php if ( empty( $contributors ) ) : ?>
|
|
|
|
<div class="form-field">
|
|
<label for="5ftf-pledge-contributors">
|
|
<?php esc_html_e( 'Contributors', 'wordpressorg' ); ?>
|
|
</label>
|
|
<input
|
|
type="text"
|
|
id="5ftf-pledge-contributors"
|
|
name="pledge-contributors"
|
|
value="<?php echo esc_attr( $data['pledge-contributors'] ); ?>"
|
|
required
|
|
aria-describedby="5ftf-pledge-contributors-help"
|
|
/>
|
|
<p id="5ftf-pledge-contributors-help">
|
|
<?php esc_html_e( 'Separate each username with a comma.', 'wordpressorg' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<?php else : ?>
|
|
|
|
<div class="5ftf-contributors">
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|