alert

Show an alert dialog.

Example:

{% button action={alert text="hello world"} %}

Shows an alert dialog with the text “hello world”.

Alert accepts the following arguments:

Argument Description Example
title Title of the alert. title=”Alert”
text The text to be displayed. text=”Hola!”
button Text for the button. Defaults to “OK” button=”Bummer”
only_text Set this to not show the “OK” button. only_text
action Action to be done when the user clicks on the OK button. There can be multiple actions.  
backdrop Show backdrop: true, false, or the string “static” backdrop=false
level Nesting of the dialog. Non negative integer, higher numbered levels are displayed above lower levels. Special level "top" to force display on top. level=”top”

The alert dialog is rendered using the _action_dialog_alert.tpl template. Overrule this template to change the contents of the alert dialog.

Edit on GitHub

Notifications confirm

Referred by

button

Makes a button with an action attached.