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 = $('