From 7fea3914fbfc0748f26dfe41445b5f0d12f406e6 Mon Sep 17 00:00:00 2001 From: Pavel Vomacka Date: Fri, 26 Aug 2016 13:11:22 +0200 Subject: [PATCH] WebUI add support for sub-CAs while revoking certificates Also the same for removing certificate hold. https://fedorahosted.org/freeipa/ticket/6216 Reviewed-By: Petr Vobornik Reviewed-By: Stanislav Laznicka --- install/ui/src/freeipa/certificate.js | 143 +++++++++++++++++++------- install/ui/src/freeipa/widget.js | 1 + 2 files changed, 107 insertions(+), 37 deletions(-) diff --git a/install/ui/src/freeipa/certificate.js b/install/ui/src/freeipa/certificate.js index e67c348b7..9ab400278 100755 --- a/install/ui/src/freeipa/certificate.js +++ b/install/ui/src/freeipa/certificate.js @@ -244,47 +244,107 @@ IPA.cert.download_dialog = function(spec) { return that; }; -IPA.cert.revoke_dialog = function(spec) { - +IPA.cert.revocation_reason_select_widget = function(spec) { spec = spec || {}; - spec.width = spec.width || 500; - spec.ok_label = spec.ok_label || '@i18n:buttons.revoke'; - var that = IPA.confirm_dialog(spec); - IPA.table_mixin().apply(that); + var that = IPA.select_widget(spec); - that.get_reason = function() { - return that.select.val(); - }; - - that.create_content = function() { - - var table = that.create_layout().appendTo(that.container); - - var tr = that.create_row().appendTo(table); - var td = that.create_cell('@i18n:objects.cert.note', ':').appendTo(tr); - td = that.create_cell('@i18n:objects.cert.revoke_confirmation') - .appendTo(tr); - - tr = that.create_row().appendTo(table); - td = that.create_header_cell('@i18n:objects.cert.reason', ':') - .appendTo(tr); - td = that.create_cell().appendTo(tr); - - that.select = $('