mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-25 04:13:44 +03:00

This updates the display of contributors into a table view, and adds the ability to add and remove contributors to existing pledges. The display has been refactored to use JS templates & JSON contributor data– the data is output onto the page when loaded from the server, and rendered when the page finishes loading. Adding & removing contributors now submits to an admin-ajax.php endpoint, which, if successful, return the new list of contributors. This ensures the display is always up to date. Fixes #3
25 lines
713 B
PHP
25 lines
713 B
PHP
<?php
|
|
namespace WordPressDotOrg\FiveForTheFuture\View;
|
|
|
|
/** @var array $data */
|
|
/** @var bool $is_manage */
|
|
?>
|
|
|
|
<div class="form-field">
|
|
<label for="5ftf-pledge-contributors">
|
|
<?php esc_html_e( 'Contributor Usernames', 'wordpressorg' ); ?>
|
|
</label>
|
|
<input
|
|
type="text"
|
|
id="5ftf-pledge-contributors"
|
|
name="pledge-contributors"
|
|
placeholder="sanguine.zoe206, captain-mal, kayleefixesyou"
|
|
value="<?php echo esc_attr( $data['pledge-contributors'] ); ?>"
|
|
<?php echo $is_manage ? '' : 'required'; ?>
|
|
aria-describedby="5ftf-pledge-contributors-help"
|
|
/>
|
|
<p id="5ftf-pledge-contributors-help">
|
|
<?php esc_html_e( 'Separate each WordPress.org username with a comma.', 'wordpressorg' ); ?>
|
|
</p>
|
|
</div>
|