diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-09-28 15:56:25 -0500 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-09-29 16:57:19 +0000 |
commit | f99ab781ea33f0d7ca6df26090cd99f9315454ac (patch) | |
tree | 548558b589a656503eeb50aa090eed3a45b6f8e4 /install/ui/service.js | |
parent | ecb58275e30f215143c57bdf96094103c8fda7ba (diff) | |
download | freeipa-f99ab781ea33f0d7ca6df26090cd99f9315454ac.tar.gz freeipa-f99ab781ea33f0d7ca6df26090cd99f9315454ac.tar.xz freeipa-f99ab781ea33f0d7ca6df26090cd99f9315454ac.zip |
Disable enroll button if nothing selected.
A new IPA.dialog_button class has been added to encapsulate the
buttons in the dialog box so they can be managed more easily.
The adder dialog has been modified to disable the enroll button if
there is no entries selected.
Ticket #1856
Diffstat (limited to 'install/ui/service.js')
-rw-r--r-- | install/ui/service.js | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/install/ui/service.js b/install/ui/service.js index f8e95f897..7db8a6657 100644 --- a/install/ui/service.js +++ b/install/ui/service.js @@ -261,20 +261,24 @@ IPA.service_provisioning_status_widget = function (spec) { dialog.container.append(IPA.messages.objects.service.unprovision_confirmation); }; - dialog.add_button(IPA.messages.objects.service.unprovision, function() { - var pkey = that.result['krbprincipalname'][0]; - IPA.command({ - entity: that.entity.name, - method: 'disable', - args: [pkey], - on_success: function(data, text_status, xhr) { - set_status('missing'); - dialog.close(); - }, - on_error: function(xhr, text_status, error_thrown) { - dialog.close(); - } - }).execute(); + dialog.create_button({ + name: 'unprovision', + label: IPA.messages.objects.service.unprovision, + click: function() { + var pkey = that.result['krbprincipalname'][0]; + IPA.command({ + entity: that.entity.name, + method: 'disable', + args: [pkey], + on_success: function(data, text_status, xhr) { + set_status('missing'); + dialog.close(); + }, + on_error: function(xhr, text_status, error_thrown) { + dialog.close(); + } + }).execute(); + } }); dialog.open(that.container); |