summaryrefslogtreecommitdiffstats
path: root/install/ui/entitle.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-04-14 15:43:57 -0500
committerAdam Young <ayoung@redhat.com>2011-04-18 11:12:02 -0400
commitfc7c1cbb6a3e2cdec4d1f8b0860c040ac3204e90 (patch)
tree7479196578958f1961a9d7ead4672965b87bf6d4 /install/ui/entitle.js
parent8f9ddb058f922fbd33c4d15986eeb1f5be521cc5 (diff)
downloadfreeipa-fc7c1cbb6a3e2cdec4d1f8b0860c040ac3204e90.tar.gz
freeipa-fc7c1cbb6a3e2cdec4d1f8b0860c040ac3204e90.tar.xz
freeipa-fc7c1cbb6a3e2cdec4d1f8b0860c040ac3204e90.zip
Entitlement download.
A Download link has been added to download entitlement certificates.
Diffstat (limited to 'install/ui/entitle.js')
-rw-r--r--install/ui/entitle.js37
1 files changed, 36 insertions, 1 deletions
diff --git a/install/ui/entitle.js b/install/ui/entitle.js
index 4c9cd13c6..17be45835 100644
--- a/install/ui/entitle.js
+++ b/install/ui/entitle.js
@@ -56,6 +56,11 @@ IPA.entity_factories.entitle = function() {
{
name: 'end',
label: 'End'
+ },
+ {
+ factory: IPA.entitle.certificate_column,
+ name: 'certificate',
+ label: 'Certificate'
}
]
}).
@@ -404,6 +409,36 @@ IPA.entitle.search_facet = function(spec) {
return that;
};
+IPA.entitle.certificate_column = function(spec) {
+
+ spec = spec || {};
+
+ var that = IPA.column(spec);
+
+ that.setup = function(container, record) {
+ container.empty();
+
+ var certificate = record[that.name];
+
+ $('<a/>', {
+ 'href': '#download',
+ 'html': 'Download',
+ 'click': function() {
+ var dialog = IPA.cert.download_dialog({
+ title: 'Download Certificate',
+ certificate: certificate,
+ add_pem_delimiters: false
+ });
+ dialog.init();
+ dialog.open();
+ return false;
+ }
+ }).appendTo(container);
+ };
+
+ return that;
+};
+
IPA.entitle.certificate_dialog = function(spec) {
spec = spec || {};
@@ -542,4 +577,4 @@ IPA.entitle.import_dialog = function(spec) {
});
return that;
-}; \ No newline at end of file
+};