mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-19 01:45:27 +00:00
refactor is_active
trigger view and enable_otp
trigger view in UserDetail page;trivial changes
This commit is contained in:
@@ -151,4 +151,25 @@ function getIDall() {
|
||||
check_array.push(id);
|
||||
});
|
||||
return check_array.join(",");
|
||||
}
|
||||
}
|
||||
|
||||
function APIUpdateAttr(url, body, success, error, method) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: method || "PATCH",
|
||||
data: body
|
||||
}).done(function(data, textStatue, jqXHR) {
|
||||
if (typeof success === 'function') {
|
||||
return success(data)
|
||||
} else {
|
||||
toastr.success('Update Success!')
|
||||
}
|
||||
}).fail(function(jqXHR, textStatue, errorThrown) {
|
||||
if (typeof error === 'function') {
|
||||
return error(errorThrown)
|
||||
} else {
|
||||
toastr.error('Error occurred while updating.')
|
||||
}
|
||||
})
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user