summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/widget.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/src/freeipa/widget.js')
-rw-r--r--install/ui/src/freeipa/widget.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index ae1ada239..780afb2bc 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -5557,12 +5557,18 @@ exp.alert_helper = IPA.alert_helper = {
* @param {Object} alert
* @return {jQuery} alert as html element
*/
- render_alert: function(alert) {
+ render_alert: function(alert, close_icon) {
var el = $('<div/>', {
'data-name': alert.name,
- 'class': alert.cls
+ 'class': "fade in " + alert.cls
});
+ if (close_icon) {
+ el.addClass('alert-dismissable');
+ el.append("<button type=\"button\" class=\"close\" \
+ data-dismiss=\"alert\"><span aria-hidden=\"true\">&times;\
+ </span><span class=\"sr-only\">Close</span></button>");
+ }
$('<span/>', { 'class': alert.icon }).appendTo(el);
el.append(' ');
el.append(alert.text);