You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 20, 2024. It is now read-only.
Admin Panel includes a generic confirmation modal for links, out of the box. Using HTML data attributes on `<a>`-tags the modal can be configured in different ways. Just add a data attribute to your link and you're all set.
9
+
10
+
Triggering the modal will append a HTML-element form to the DOM, containing title, text, confirm button and dismiss button.
11
+
12
+
By default confirm submits the form and dismiss will remove the HTML-element from the DOM
13
+
14
+
**Basic usage**
15
+
16
+
```HTML
17
+
<ahref="#"data-confirm="true">Open modal</a>
18
+
```
19
+
20
+
**Data Attributes**
21
+
22
+
|Attribute|Description|example|
23
+
|---------|-----------|-------|
24
+
|data-confirm|Initialize the modal|`data-confirm="true"`|
25
+
|data-title|Sets the title of the modal|`data-title="Please confirm"`|
26
+
|data-text|Sets the text of the modal|`data-text="Are you sure you want to continue?"`|
27
+
|data-button|Sets bootstrap css selector for the confirm button|`data-button="danger"`_[primary,secondary,success,danger,warning,info,light,dark]_|
28
+
|data-confirm-btn|Set the text label on the "confirm"-button|`data-confirm-btn="Yes"`|
29
+
|data-dismiss-btn|Set the text label on the "dismiss"-button|`data-confirm-btn="No"`|
0 commit comments