From 04e337b5529edcaca0bedbbf224f5bc226c1d9bf Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 20 Aug 2018 22:11:51 -0400 Subject: [PATCH] pledge editor funds to API and datatables ajaxified --- src/api/index.php | 1 + src/api/routes/finance/finance-general.php | 13 +++ .../templates/finances/payment-fund-split.php | 31 +----- src/v2/templates/finances/payment.php | 99 +++++++++++++++++++ 4 files changed, 116 insertions(+), 28 deletions(-) create mode 100644 src/api/routes/finance/finance-general.php diff --git a/src/api/index.php b/src/api/index.php index 08e7725d09..3416fcacb1 100644 --- a/src/api/index.php +++ b/src/api/index.php @@ -34,6 +34,7 @@ require __DIR__ . '/routes/calendar/calendar.php'; // finance routes +require __DIR__ . '/routes/finance/finance-general.php'; require __DIR__ . '/routes/finance/finance-deposits.php'; require __DIR__ . '/routes/finance/finance-payments.php'; diff --git a/src/api/routes/finance/finance-general.php b/src/api/routes/finance/finance-general.php new file mode 100644 index 0000000000..cdeada67fc --- /dev/null +++ b/src/api/routes/finance/finance-general.php @@ -0,0 +1,13 @@ +group('/finance/', function () { + + $this->get('funds', function ($request, $response, $args) { + $DonationFunds = DonationFundQuery::create()->filterByActive("true")->find(); + return $response->withJSON($DonationFunds->toArray()); + }); +}); diff --git a/src/v2/templates/finances/payment-fund-split.php b/src/v2/templates/finances/payment-fund-split.php index 98fcab309f..953ccf9e93 100644 --- a/src/v2/templates/finances/payment-fund-split.php +++ b/src/v2/templates/finances/payment-fund-split.php @@ -19,34 +19,9 @@ - - $fun_name) { - ?> - - - - ">
- - - - - " /> -
- - - - - - - - - - \ No newline at end of file + + + diff --git a/src/v2/templates/finances/payment.php b/src/v2/templates/finances/payment.php index c2de3168b7..f21d09a518 100644 --- a/src/v2/templates/finances/payment.php +++ b/src/v2/templates/finances/payment.php @@ -14,6 +14,105 @@ + +