Provides support for the sweetalert2 library, a "beautiful, responsive, customizable, accessible (WAI-ARIA) replacement for JavaScript's popup boxes".
The extension is licensed under AGPL-3.0. sweetalert2 is available under the MIT license.
- PHP v7.2+
- CiviCRM 5.latest
Install as a regular extension.
- If updating the sweetalert libraries, run
npm install. - Then copy
node_modules/sweetalert2/dist/sweetalert2*.css ./cssandnode_modules/sweetalert2/dist/sweetalert2*.js ./js
This extension does not do anything out of the box. It is available for other extensions.
SweetAlert introduces a number of breaking changes from release 11. Release 10 provides both legacy methods and new methods so allows existing integrations to transition. *
- Update SweetAlert from 9.17.1 to 10.16.7. Changelog.
- Regenerate autogenerated code for PHP7.4 support.
Load libraries via civicrm_coreResourceList hook instead of buildForm/pageRun. This allows it to work everywhere and (eg) makes it available with Stripe + drupal webform_civicrm.
Update to SweetAlert2 version 9.17.1 - https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md
Load libraries in page-header region instead of page-footer so it is always available for libraries loaded in later regions.
Switch to SweetAlert2 version 9.7.1 - see "Breaking Changes" at https://github.com/sweetalert2/sweetalert2/releases/tag/v9.0.0
