forked from v4l3n71n/covas-bo
add name
This commit is contained in:
@@ -26,14 +26,13 @@ document.getElementById("addUser").addEventListener("click", function(){
|
||||
}
|
||||
|
||||
dataPut = {
|
||||
"username": document.getElementById("usernameUpdateInput").value,
|
||||
"email": document.getElementById("emailUpdateInput").value,
|
||||
"name": document.getElementById("nameUpdateInput").value,
|
||||
"firstName": document.getElementById("firstNameUpdateInput").value,
|
||||
"birth": document.getElementById("birthUpdateInput").value,
|
||||
"password": document.getElementById("passwordUpdateInput").value,
|
||||
"roles": selector["roles"]
|
||||
|
||||
"username": document.getElementById("usernameUpdateInput").value,
|
||||
"email": document.getElementById("emailUpdateInput").value,
|
||||
"name": document.getElementById("nameUpdateInput").value,
|
||||
"firstName": document.getElementById("firstNameUpdateInput").value,
|
||||
"birth": document.getElementById("birthUpdateInput").value,
|
||||
"password": document.getElementById("passwordUpdateInput").value,
|
||||
"roles": selector["roles"]
|
||||
}
|
||||
instance({
|
||||
method : "put",
|
||||
|
@@ -59,11 +59,13 @@ function buildParam(typeInput){
|
||||
if(search.length > 0){
|
||||
if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(search)){
|
||||
param = param + "email="+search+"&";
|
||||
} else {
|
||||
} else if (/^[a-fA-F0-9]{24}$/.test(search)){
|
||||
param = param + "id="+search+"&";
|
||||
}
|
||||
} else {
|
||||
param = param + "name="+search+"&";
|
||||
}
|
||||
} else {
|
||||
listParam.push("email"); listParam.push("id");
|
||||
listParam.push("email"); listParam.push("id"); listParam.push("name");
|
||||
}
|
||||
|
||||
for (var i=0; i<listParam.length; i++){
|
||||
|
Reference in New Issue
Block a user