diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-04-14 15:43:57 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-04-18 11:12:02 -0400 |
commit | fc7c1cbb6a3e2cdec4d1f8b0860c040ac3204e90 (patch) | |
tree | 7479196578958f1961a9d7ead4672965b87bf6d4 /install/ui/certificate.js | |
parent | 8f9ddb058f922fbd33c4d15986eeb1f5be521cc5 (diff) | |
download | freeipa-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/certificate.js')
-rwxr-xr-x | install/ui/certificate.js | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/install/ui/certificate.js b/install/ui/certificate.js index c52163629..30ac0d74a 100755 --- a/install/ui/certificate.js +++ b/install/ui/certificate.js @@ -74,7 +74,7 @@ IPA.cert.parse_dn = function(dn) { return result; }; -IPA.cert.get_dialog = function(spec) { +IPA.cert.download_dialog = function(spec) { spec = spec || {}; @@ -82,8 +82,9 @@ IPA.cert.get_dialog = function(spec) { that.width = spec.width || 500; that.height = spec.height || 400; + that.add_pem_delimiters = typeof spec.add_pem_delimiters == 'undefined' ? true : spec.add_pem_delimiters; - that.usercertificate = spec.usercertificate || ''; + that.certificate = spec.certificate || ''; that.add_button(IPA.messages.buttons.close, function() { that.close(); @@ -95,10 +96,15 @@ IPA.cert.get_dialog = function(spec) { style: 'width: 100%; height: 275px;' }).appendTo(that.container); - textarea.val( - IPA.cert.BEGIN_CERTIFICATE+'\n'+ - that.usercertificate+'\n'+ - IPA.cert.END_CERTIFICATE); + var certificate = that.certificate; + + if (that.add_pem_delimiters) { + certificate = IPA.cert.BEGIN_CERTIFICATE+'\n'+ + that.certificate+'\n'+ + IPA.cert.END_CERTIFICATE; + } + + textarea.val(certificate); }; return that; @@ -675,9 +681,9 @@ IPA.cert.status_widget = function(spec) { title = title.replace('${entity}', that.entity_label); title = title.replace('${primary_key}', entity_name); - var dialog = IPA.cert.get_dialog({ - 'title': title, - 'usercertificate': entity_certificate + var dialog = IPA.cert.download_dialog({ + title: title, + certificate: entity_certificate }); dialog.init(); |