From 59713ca0f181340ae364e9d6bb5ae840d8e822ec Mon Sep 17 00:00:00 2001 From: Corey McKrill <916023+coreymckrill@users.noreply.github.com> Date: Thu, 24 Oct 2019 20:06:47 -0700 Subject: [PATCH] Pledges: Move contributor management UI to separate file (#47) Having both the input for adding a comma separated list of contributors to a new pledge and the UI for managing the contributors on an existing pledge in the same file was confusing and it conflated two different pieces of functionality. It also caused `undefined index` errors in some views because `'pledge-contributors'` only exists when submitting the new pledge form. --- plugins/wporg-5ftf/includes/pledge-meta.php | 2 +- .../wporg-5ftf/views/form-pledge-manage.php | 2 +- .../views/inputs-pledge-contributors.php | 53 ----------------- .../wporg-5ftf/views/manage-contributors.php | 57 +++++++++++++++++++ 4 files changed, 59 insertions(+), 55 deletions(-) create mode 100644 plugins/wporg-5ftf/views/manage-contributors.php diff --git a/plugins/wporg-5ftf/includes/pledge-meta.php b/plugins/wporg-5ftf/includes/pledge-meta.php index 902c738..2d690ad 100755 --- a/plugins/wporg-5ftf/includes/pledge-meta.php +++ b/plugins/wporg-5ftf/includes/pledge-meta.php @@ -168,7 +168,7 @@ function render_meta_boxes( $pledge, $box ) { break; case 'pledge-contributors': - require FiveForTheFuture\get_views_path() . 'inputs-pledge-contributors.php'; + require FiveForTheFuture\get_views_path() . 'manage-contributors.php'; break; } diff --git a/plugins/wporg-5ftf/views/form-pledge-manage.php b/plugins/wporg-5ftf/views/form-pledge-manage.php index a97c2d7..1b7bdc2 100644 --- a/plugins/wporg-5ftf/views/form-pledge-manage.php +++ b/plugins/wporg-5ftf/views/form-pledge-manage.php @@ -10,7 +10,7 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;