README.md 1.39 KB
Newer Older
bgm's avatar
init  
bgm committed
1
2
# sweetalert

3
![Screenshot](images/screenshot.png)
bgm's avatar
init  
bgm committed
4
5
6
7
8
9
10

Provides support for the [sweetalert2 library](https://sweetalert2.github.io/), a "beautiful, responsive, customizable, accessible (WAI-ARIA) replacement for JavaScript's popup boxes".

The extension is licensed under [AGPL-3.0](LICENSE.txt). sweetalert2 is available under the MIT license.

## Requirements

11
* PHP v7.2+
bgm's avatar
init  
bgm committed
12
13
14
15
* CiviCRM 5.latest

## Installation

mattwire's avatar
mattwire committed
16
Install as a regular extension.
bgm's avatar
init  
bgm committed
17

mattwire's avatar
mattwire committed
18
19
20
21
## Packaging / Updating

1. If updating the sweetalert libraries, run `npm install`.
1. Then copy `node_modules/sweetalert2/dist/sweetalert2*.css ./css` and `node_modules/sweetalert2/dist/sweetalert2*.js ./js`
bgm's avatar
init  
bgm committed
22
23
24
25

## Usage

This extension does not do anything out of the box. It is available for other extensions.
mattwire's avatar
mattwire committed
26
27
28

## Changelog

mattwire's avatar
mattwire committed
29
30
31
32
#### 1.4.1

* Regenerate autogenerated code for PHP7.4 support.

mattwire's avatar
mattwire committed
33
34
35
36
#### 1.4

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`.

37
38
39
40
#### 1.3

Update to SweetAlert2 version 9.17.1 - https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md

41
42
43
44
#### 1.2

Load libraries in `page-header` region instead of `page-footer` so it is always available for libraries loaded in later regions.

mattwire's avatar
mattwire committed
45
46
47
#### 1.1

Switch to SweetAlert2 version 9.7.1 - see "Breaking Changes" at https://github.com/sweetalert2/sweetalert2/releases/tag/v9.0.0