add groups enable and remove
This commit is contained in:
parent
9a4f17f469
commit
689cd27e73
@ -101,14 +101,14 @@ instance.get("users", {withCredentials: true, params:param}).then(function(respo
|
|||||||
checkboxList = document.getElementsByClassName("checkboxList");
|
checkboxList = document.getElementsByClassName("checkboxList");
|
||||||
for (var j=0; j<checkboxList.length; j++){
|
for (var j=0; j<checkboxList.length; j++){
|
||||||
if(checkboxList[j].checked){
|
if(checkboxList[j].checked){
|
||||||
userid = checkboxList.getAttribute("userid");
|
userid = checkboxList[j].getAttribute("userid");
|
||||||
if (userid.length > 0){
|
if (userid.length > 0){
|
||||||
userids.push(userid);
|
userids.push(userid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
param["userids"]=userids;
|
param["ids"]=userids;
|
||||||
|
|
||||||
switch(e.currentTarget.id){
|
switch(e.currentTarget.id){
|
||||||
case "disableUserButton":
|
case "disableUserButton":
|
||||||
@ -118,7 +118,6 @@ instance.get("users", {withCredentials: true, params:param}).then(function(respo
|
|||||||
case "removeUserButton":
|
case "removeUserButton":
|
||||||
httpMethod = "delete";
|
httpMethod = "delete";
|
||||||
httpUrl = "users/groups?remove=true";
|
httpUrl = "users/groups?remove=true";
|
||||||
param["remove"]=true;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
httpMethod = "patch";
|
httpMethod = "patch";
|
||||||
@ -128,7 +127,7 @@ instance.get("users", {withCredentials: true, params:param}).then(function(respo
|
|||||||
instance({
|
instance({
|
||||||
method: httpMethod,
|
method: httpMethod,
|
||||||
url: httpUrl,
|
url: httpUrl,
|
||||||
params:param,
|
data:param,
|
||||||
withCredentials: true
|
withCredentials: true
|
||||||
})
|
})
|
||||||
.then(function(response){
|
.then(function(response){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user