admin-add-ons.asset.php
1 year ago
admin-add-ons.js
1 year ago
admin-onboarding-wizard-rtl.css
1 year ago
admin-onboarding-wizard.asset.php
1 year ago
admin-onboarding-wizard.css
1 year ago
admin-onboarding-wizard.js
1 year ago
admin-reports-rtl.css
1 year ago
admin-reports-widget-rtl.css
1 year ago
admin-reports-widget.asset.php
1 year ago
admin-reports-widget.css
1 year ago
admin-reports-widget.js
1 year ago
admin-reports.asset.php
1 year ago
admin-reports.css
1 year ago
admin-reports.js
1 year ago
admin-setup.asset.php
1 year ago
admin-setup.js
1 year ago
admin-shortcodes.asset.php
1 year ago
admin-shortcodes.js
1 year ago
admin-upsell-addons-page-rtl.css
1 year ago
admin-upsell-addons-page.asset.php
1 year ago
admin-upsell-addons-page.css
1 year ago
admin-upsell-addons-page.js
1 year ago
admin-upsell-sale-banner.asset.php
1 year ago
admin-upsell-sale-banner.js
1 year ago
admin-widgets.asset.php
1 year ago
admin-widgets.js
1 year ago
admin.asset.php
1 month ago
admin.js
1 month ago
donation-options.asset.php
1 year ago
donation-options.js
1 year ago
donor-dashboards-app-rtl.css
6 months ago
donor-dashboards-app.asset.php
2 weeks ago
donor-dashboards-app.css
6 months ago
donor-dashboards-app.js
2 weeks ago
donor-dashboards-block.asset.php
8 months ago
donor-dashboards-block.js
8 months ago
give-add-v2form-rtl.css
1 year ago
give-add-v2form.asset.php
6 months ago
give-add-v2form.css
1 year ago
give-add-v2form.js
6 months ago
give-admin-donation-forms-rtl.css
9 months ago
give-admin-donation-forms.asset.php
6 months ago
give-admin-donation-forms.css
9 months ago
give-admin-donation-forms.js
6 months ago
give-admin-donations-rtl.css
9 months ago
give-admin-donations.asset.php
9 months ago
give-admin-donations.css
9 months ago
give-admin-donations.js
9 months ago
give-admin-donors-rtl.css
9 months ago
give-admin-donors.asset.php
9 months ago
give-admin-donors.css
9 months ago
give-admin-donors.js
9 months ago
give-admin-event-tickets-details-rtl.css
9 months ago
give-admin-event-tickets-details.asset.php
9 months ago
give-admin-event-tickets-details.css
9 months ago
give-admin-event-tickets-details.js
9 months ago
give-admin-event-tickets-rtl.css
9 months ago
give-admin-event-tickets.asset.php
9 months ago
give-admin-event-tickets.css
9 months ago
give-admin-event-tickets.js
9 months ago
give-admin-subscriptions-rtl.css
9 months ago
give-admin-subscriptions.asset.php
9 months ago
give-admin-subscriptions.css
9 months ago
give-admin-subscriptions.js
9 months ago
give-classic-template.asset.php
1 year ago
give-classic-template.js
1 year ago
give-donation-forms-load-async-data.asset.php
1 year ago
give-donation-forms-load-async-data.js
1 year ago
give-donation-summary.asset.php
1 year ago
give-donation-summary.js
1 year ago
give-edit-v2form-rtl.css
1 year ago
give-edit-v2form.asset.php
6 months ago
give-edit-v2form.css
1 year ago
give-edit-v2form.js
6 months ago
give-log-list-table-app-rtl.css
9 months ago
give-log-list-table-app.asset.php
9 months ago
give-log-list-table-app.css
9 months ago
give-log-list-table-app.js
9 months ago
give-migrations-list-table-app-rtl.css
9 months ago
give-migrations-list-table-app.asset.php
9 months ago
give-migrations-list-table-app.css
9 months ago
give-migrations-list-table-app.js
9 months ago
give-sequoia-template.asset.php
1 year ago
give-sequoia-template.js
1 year ago
give-stripe-becs.asset.php
1 year ago
give-stripe-becs.js
1 year ago
give-stripe-sepa.asset.php
1 year ago
give-stripe-sepa.js
1 year ago
give-stripe.asset.php
1 year ago
give-stripe.js
1 year ago
give.asset.php
1 year ago
give.js
1 year ago
iframe-content.asset.php
1 year ago
iframe-content.js
1 year ago
orphaned-forms-list-table-rtl.css
9 months ago
orphaned-forms-list-table.asset.php
9 months ago
orphaned-forms-list-table.css
9 months ago
orphaned-forms-list-table.js
9 months ago
parent-page.asset.php
1 year ago
parent-page.js
1 year ago
payment-gateway.asset.php
1 year ago
payment-gateway.js
1 year ago
paypal-commerce.asset.php
1 year ago
paypal-commerce.js
1 year ago
plugin-deactivation-survey.asset.php
1 year ago
plugin-deactivation-survey.js
1 year ago
utils.asset.php
1 year ago
utils.js
1 year ago
welcome-banner-rtl.css
1 year ago
welcome-banner.asset.php
1 year ago
welcome-banner.css
1 year ago
welcome-banner.js
1 year ago
give-donation-summary.js
1 lines
| 1 | window.GiveDonationSummary={init:function(){GiveDonationSummary.initAmount(),GiveDonationSummary.initFrequency(),GiveDonationSummary.initTotal()},getFormattedDonationAmount:function(e){const n=Give.fn.unFormatCurrency(e.find('[name="give-amount"]').val(),Give.form.fn.getInfo("decimal_separator",e));return Give.fn.formatCurrency(n,{symbol:Give.form.fn.getInfo("currency_symbol",e)},e)},initAmount:function(){GiveDonationSummary.observe('[name="give-amount"]',(function(e,n){n.find('[data-tag="amount"]').html(GiveDonationSummary.getFormattedDonationAmount(n))}));const e=document.querySelector('[name="give-amount"]');if(e){const n=jQuery(e.closest(".give-form"));e.addEventListener("change",(function(){n.find('[data-tag="amount"]').html(GiveDonationSummary.getFormattedDonationAmount(n))}))}},initFrequency:function(){GiveDonationSummary.observe('[name="give-recurring-period"]',GiveDonationSummary.handleDonorsChoiceRecurringFrequency),GiveDonationSummary.observe('[name="give-price-id"]',GiveDonationSummary.handleAdminDefinedRecurringFrequency),GiveDonationSummary.observe('[name="_give_is_donation_recurring"]',GiveDonationSummary.handleAdminDefinedSetDonationFrequency),GiveDonationSummary.observe('[name="give-price-id"]',GiveDonationSummary.handleAdminDefinedRecurringFrequency)},handleDonorsChoiceRecurringFrequency:function(e,n){n.find(".js-give-donation-summary-frequency-help-text").toggle(!e.checked),n.find('[data-tag="frequency"]').toggle(!e.checked),n.find('[data-tag="recurring"]').toggle(e.checked).html(e.dataset.periodLabel);const t=document.querySelector('[name="give-recurring-period-donors-choice"]');if(t){const e=t.options[t.selectedIndex].value||!1;e&&n.find('[data-tag="recurring"]').html(GiveDonationSummaryData.recurringLabelLookup[e])}},handleAdminDefinedRecurringFrequency:function(e,n){const t=e.value,i=document.querySelector(".give_recurring_donation_details");if(!i)return;const o=JSON.parse(i.value);if(void 0!==o.multi){const e="yes"===o.multi[t]._give_recurring,i=o.multi[t].give_recurring_pretty_text;n.find(".js-give-donation-summary-frequency-help-text").toggle(!e),n.find('[data-tag="frequency"]').toggle(!e),n.find('[data-tag="recurring"]').toggle(e).html(i)}},handleAdminDefinedSetDonationFrequency:function(e,n){const t=e.value,i=document.querySelector(".give-recurring-admin-choice");t&&i&&(n.find(".js-give-donation-summary-frequency-help-text").toggle(!t),n.find('[data-tag="frequency"]').toggle(!t),n.find('[data-tag="recurring"]').html(i.textContent))},handleFees:function(e){if(!e.find('[name="give-fee-mode-enable"]')||"true"!==e.find('[name="give-fee-mode-enable"]').val())return void e.find(".js-give-donation-summary-fees").toggle(!1);e.find(".js-give-donation-summary-fees").toggle(!0);const n=e.find(".give-fee-message-label").attr("data-feemessage").split(" "),t=e.find(".give-fee-message-label-text").text().split(" ").filter((e=>!n.includes(e))).pop();e.find('[data-tag="fees"]').html(t)},initTotal:function(){GiveDonationSummary.observe(".give-final-total-amount",(function(e,n){n.find('[data-tag="total"]').html(e.textContent),GiveDonationSummary.handleFees(n)}));const e=document.querySelector(".give-final-total-amount");e&&(e.textContent=e.textContent)},handleNavigateBack:function(){},onGatewayLoadSuccess:function(){const e=jQuery("#give_purchase_form_wrap .give-donation-summary-section").detach();e.length&&(jQuery(".give-donation-summary-section").remove(),e.appendTo("#donate-fieldset"),GiveDonationSummary.initTotal(),GiveDonationSummary.handleNavigateBack=function(e){e.stopPropagation(),e.preventDefault(),window.formNavigator.back()})},observe:function(e,n,t=!0){const i=document.querySelector(e);if(!i)return;const o=jQuery(i.closest(".give-form"));new MutationObserver((function(e){for(const t of e)"attributes"===t.type&&n(t.target,o)})).observe(i,{attributes:!0}),t&&n(i,o)}},jQuery(document).on("give:postInit",GiveDonationSummary.init),jQuery(document).on("Give:onGatewayLoadSuccess",GiveDonationSummary.onGatewayLoadSuccess); |