diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-02-21 18:36:42 -0600 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-02-22 13:26:09 -0500 |
commit | 39a00b496c57b1617fff9564dd78529b0486216a (patch) | |
tree | ebd82a6c683747073069ed6701b763c794792957 /install/ui/certificate.js | |
parent | 397da3f78192cc8eafdf6d36d0ac1f3303bfaaa4 (diff) | |
download | freeipa-39a00b496c57b1617fff9564dd78529b0486216a.tar.gz freeipa-39a00b496c57b1617fff9564dd78529b0486216a.tar.xz freeipa-39a00b496c57b1617fff9564dd78529b0486216a.zip |
I18n update for dialog box buttons.
https://fedorahosted.org/freeipa/ticket/899
Diffstat (limited to 'install/ui/certificate.js')
-rwxr-xr-x | install/ui/certificate.js | 124 |
1 files changed, 71 insertions, 53 deletions
diff --git a/install/ui/certificate.js b/install/ui/certificate.js index b91d2b9bc..c5de56c1f 100755 --- a/install/ui/certificate.js +++ b/install/ui/certificate.js @@ -98,15 +98,18 @@ IPA.cert.get_dialog = function(spec) { IPA.cert.END_CERTIFICATE); that.open = function() { + + var buttons = {}; + + buttons[IPA.messages.buttons.close] = function() { + dialog.dialog('destroy'); + }; + dialog.dialog({ modal: true, width: 500, height: 400, - buttons: { - 'Close': function() { - dialog.dialog('destroy'); - } - } + buttons: buttons }); }; @@ -153,23 +156,27 @@ IPA.cert.revoke_dialog = function(spec) { } that.open = function() { + + var buttons = {}; + + buttons[IPA.messages.buttons.revoke] = function() { + var values = {}; + values['reason'] = select.val(); + if (that.revoke) { + that.revoke(values); + } + dialog.dialog('destroy'); + }; + + buttons[IPA.messages.buttons.cancel] = function() { + dialog.dialog('destroy'); + }; + dialog.dialog({ modal: true, width: 500, height: 300, - buttons: { - 'Revoke': function() { - var values = {}; - values['reason'] = select.val(); - if (that.revoke) { - that.revoke(values); - } - dialog.dialog('destroy'); - }, - 'Cancel': function() { - dialog.dialog('destroy'); - } - } + buttons: buttons }); }; @@ -193,22 +200,26 @@ IPA.cert.restore_dialog = function(spec) { IPA.messages.objects.cert.restore_confirmation); that.open = function() { + + var buttons = {}; + + buttons[IPA.messages.buttons.restore] = function() { + var values = {}; + if (that.restore) { + that.restore(values); + } + dialog.dialog('destroy'); + }; + + buttons[IPA.messages.buttons.cancel] = function() { + dialog.dialog('destroy'); + }; + dialog.dialog({ modal: true, width: 400, height: 200, - buttons: { - 'Restore': function() { - var values = {}; - if (that.restore) { - that.restore(values); - } - dialog.dialog('destroy'); - }, - 'Cancel': function() { - dialog.dialog('destroy'); - } - } + buttons: buttons }); }; @@ -327,15 +338,18 @@ IPA.cert.view_dialog = function(spec) { }).appendTo(tr); that.open = function() { + + var buttons = {}; + + buttons[IPA.messages.buttons.close] = function() { + dialog.dialog('destroy'); + }; + dialog.dialog({ modal: true, width: 600, height: 500, - buttons: { - 'Close': function() { - dialog.dialog('destroy'); - } - } + buttons: buttons }); }; @@ -370,28 +384,32 @@ IPA.cert.request_dialog = function(spec) { dialog.append(IPA.cert.END_CERTIFICATE_REQUEST); that.open = function() { + + var buttons = {}; + + buttons[IPA.messages.buttons.issue] = function() { + var values = {}; + var request = textarea.val(); + request = + IPA.cert.BEGIN_CERTIFICATE_REQUEST+'\n'+ + $.trim(request)+'\n'+ + IPA.cert.END_CERTIFICATE_REQUEST+'\n'; + values['request'] = request; + if (that.request) { + that.request(values); + } + dialog.dialog('destroy'); + }; + + buttons[IPA.messages.buttons.cancel] = function() { + dialog.dialog('destroy'); + }; + dialog.dialog({ modal: true, width: 500, height: 400, - buttons: { - 'Issue': function() { - var values = {}; - var request = textarea.val(); - request = - IPA.cert.BEGIN_CERTIFICATE_REQUEST+'\n'+ - $.trim(request)+'\n'+ - IPA.cert.END_CERTIFICATE_REQUEST+'\n'; - values['request'] = request; - if (that.request) { - that.request(values); - } - dialog.dialog('destroy'); - }, - 'Cancel': function() { - dialog.dialog('destroy'); - } - } + buttons: buttons }); }; |