KEYCLOAK-126: Modified modal template to allow HTML to be passed (also removed btn class from buttons) and added HTML to message in the Dialog service to use different classes at paragraphs.

This commit is contained in:
ammendonca 2013-11-04 17:49:07 +00:00
parent 97792b7e1d
commit 35e4a22093
2 changed files with 6 additions and 5 deletions

View file

@ -16,14 +16,15 @@ module.service('Auth', function() {
module.service('Dialog', function($dialog) {
var dialog = {};
dialog.confirmDelete = function(name, type, success) {
var title = 'Delete ' + name;
var msg = 'Are you sure you want to permanently delete this ' + type + '?';
var title = 'Delete ' + type.charAt(0).toUpperCase() + type.slice(1);
var msg = '<p class="primary">Are you sure you want to permanently delete the ' + type + ' "' + name + '"?</p>' +
'<p>This action can\'t be undone.</p>';
var btns = [ {
result : 'cancel',
label : 'Cancel'
}, {
result : 'ok',
label : 'Delete this ' + type,
label : 'Delete',
cssClass : 'destructive'
} ];

View file

@ -3004,10 +3004,10 @@ angular.module("template/dialog/message.html", []).run(["$templateCache", functi
" <h3>{{ title }}</h3>\n" +
"</div>\n" +
"<div class=\"modal-body\">\n" +
" <p>{{ message }}</p>\n" +
" <p ng-bind-html-unsafe=\"message\"></p>\n" +
"</div>\n" +
"<div class=\"modal-footer\">\n" +
" <button ng-repeat=\"btn in buttons\" ng-click=\"close(btn.result)\" class=\"btn\" ng-class=\"btn.cssClass\">{{ btn.label }}</button>\n" +
" <button ng-repeat=\"btn in buttons\" ng-click=\"close(btn.result)\" class=\"\" ng-class=\"btn.cssClass\">{{ btn.label }}</button> \n" +
"</div>\n" +
"</div>\n" +
"</div>\n" +