Merged IPA.cmd() into IPA.command().

The IPA.cmd() has been merged into IPA.command(). All invocations
and test cases have been converted.

Ticket #988
This commit is contained in:
Endi S. Dewata
2011-04-12 02:13:30 -05:00
committed by Adam Young
parent 9cac1d88fc
commit 805b94f22d
18 changed files with 572 additions and 429 deletions

View File

@@ -136,11 +136,17 @@ IPA.user_status_widget = function(spec) {
var jobj = $(this);
var val = jobj.attr('title');
var pkey = $.bbq.getState('user-pkey');
var command = 'user_enable';
var method = 'enable';
if (val == IPA.messages.objects.user.active) {
command = 'user_disable';
method = 'disable';
}
IPA.cmd(command, [pkey], {}, on_lock_win,on_lock_fail);
IPA.command({
entity: 'user',
method: method,
args: [pkey],
on_success: on_lock_win,
on_error: on_lock_fail
}).execute();
return (false);
}