mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-06 10:45:44 +03:00
Manage a Pledge: Enable adding/removing contributors from wp-admin. (#99)
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
This commit is contained in:
parent
f32d26ef47
commit
82192eea4c
10 changed files with 437 additions and 73 deletions
|
@ -2,7 +2,7 @@
|
|||
namespace WordPressDotOrg\FiveForTheFuture\View;
|
||||
|
||||
/** @var array $data */
|
||||
/** @var bool $readonly */
|
||||
/** @var bool $is_manage */
|
||||
?>
|
||||
|
||||
<div class="form-field">
|
||||
|
@ -15,7 +15,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
|
|||
name="pledge-contributors"
|
||||
placeholder="sanguine.zoe206, captain-mal, kayleefixesyou"
|
||||
value="<?php echo esc_attr( $data['pledge-contributors'] ); ?>"
|
||||
required
|
||||
<?php echo $is_manage ? '' : 'required'; ?>
|
||||
aria-describedby="5ftf-pledge-contributors-help"
|
||||
/>
|
||||
<p id="5ftf-pledge-contributors-help">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue