mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-14 06:15:46 +03:00
Manage Pledge: Enable pledge admins to edit contributors from manage form (#108)
* Add contributor management to manage form * Check `pledge_id` to prevent returning all contributors * Return a plain text error string – this is used in an alert box, so it can't contain HTML * Hide confirmation when pledge is a draft * Only enqueue script if the user is authorized
This commit is contained in:
parent
286e6d55ef
commit
544fe39199
8 changed files with 110 additions and 18 deletions
|
@ -4,8 +4,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
|
|||
use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
||||
|
||||
/** @var array $contributors */
|
||||
/** @var array $data */
|
||||
/** @var bool $readonly */
|
||||
/** @var int $pledge_id */
|
||||
?>
|
||||
|
||||
<script type="text/template" id="tmpl-5ftf-contributor-lists">
|
||||
|
@ -75,7 +74,7 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
|||
</script>
|
||||
|
||||
<div id="5ftf-contributors">
|
||||
<div class="pledge-contributors pledge-status__<?php echo esc_attr( get_post_status() ); ?>">
|
||||
<div class="pledge-contributors pledge-status__<?php echo esc_attr( get_post_status( $pledge_id ) ); ?>">
|
||||
<?php if ( ! empty( $contributors ) ) : ?>
|
||||
<?php
|
||||
printf(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue