From 4009e5aa3ad07fd3c3f3501b477da7afbf606bc0 Mon Sep 17 00:00:00 2001 From: Barny-Thorpe Date: Tue, 26 Mar 2024 10:47:54 +0000 Subject: [PATCH] remove unneccessary docs --- public/js/gf-giftaid-field-frontend.js | 11 ++--------- src/GfGiftAidField.php | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/public/js/gf-giftaid-field-frontend.js b/public/js/gf-giftaid-field-frontend.js index 4629c4c..e3f0744 100644 --- a/public/js/gf-giftaid-field-frontend.js +++ b/public/js/gf-giftaid-field-frontend.js @@ -1,10 +1,3 @@ -/** - * The donation total object. - * @typedef {Object} Donation - * @property {string} donation - The amount donated as a string. - * @property {string} giftAidTotal - The amount including taxback as a string. - */ - document.addEventListener('DOMContentLoaded', () => { initGiftAid(); }); @@ -46,7 +39,7 @@ function totalFieldSelector(fallback) { * Gets the total amount donated and updates the Gift Aid total. * @param {HTMLElement} elem The element that has changed. * @param {string} totalSelector selector of the chosen total field. - * @returns {Donation} The total amount donated. + * @returns {object} The donation and gift aid total. */ function getTotalAmount(elem, totalSelector) { if (! (elem instanceof HTMLInputElement) || ! elem.closest(totalSelector)) { @@ -67,7 +60,7 @@ function getTotalAmount(elem, totalSelector) { /** * Updates the gift aid display. - * @param {Donation} total + * @param {object} The donation and gift aid total. * @returns {void} */ function updateGiftAidDisplay(total) { diff --git a/src/GfGiftAidField.php b/src/GfGiftAidField.php index 2858d9e..72ee24a 100644 --- a/src/GfGiftAidField.php +++ b/src/GfGiftAidField.php @@ -27,7 +27,6 @@ public static function run(): void /** * Custom field to enable the user to choose where they would like to pull the total value from. - * Add 'donation_total_select' to the array of strings in the get_form_editor_field_settings method of your field. */ public static function addSelectedPriceFieldSetting(int $position, int $form_id): void {