* Adjust bind user error.
This commit is contained in:
@@ -15,7 +15,7 @@ window.renderGitlabUser = function(result, {row})
|
||||
return result;
|
||||
}
|
||||
|
||||
window.bindUser = function()
|
||||
window.bindUser = function(e)
|
||||
{
|
||||
const myDTable = $('#table-gitea-binduser').zui('dtable');
|
||||
const formData = myDTable.$.getFormData();
|
||||
@@ -25,10 +25,12 @@ window.bindUser = function()
|
||||
postData['giteaUserNames[]'] = [];
|
||||
for(i in bindData)
|
||||
{
|
||||
postData['giteaUserNames[]'].push(bindData[i].giteaID);
|
||||
postData['giteaUserNames[' + bindData[i].giteaID + ']'] = bindData[i].giteaUser;
|
||||
postData['zentaoUsers[' + bindData[i].giteaID + ']'] = formData['zentaoUsers[' + bindData[i].giteaID + ']'];
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
$.ajaxSubmit({
|
||||
url: $.createLink('gitea', 'bindUser', 'giteaID=' + giteaID + '&type=' + type),
|
||||
data: postData
|
||||
|
||||
@@ -50,7 +50,7 @@ form
|
||||
array(
|
||||
'text' => $lang->save,
|
||||
'btnType' => 'primary',
|
||||
'onClick' => jsRaw("() => {bindUser()}")
|
||||
'onClick' => jsRaw("bindUser")
|
||||
),
|
||||
array(
|
||||
'text' => $lang->goback,
|
||||
|
||||
@@ -15,7 +15,7 @@ window.renderGitlabUser = function(result, {row})
|
||||
return result;
|
||||
}
|
||||
|
||||
window.bindUser = function()
|
||||
window.bindUser = function(e)
|
||||
{
|
||||
const myDTable = $('#table-gitlab-binduser').zui('dtable');
|
||||
const formData = myDTable.$.getFormData();
|
||||
@@ -25,10 +25,12 @@ window.bindUser = function()
|
||||
postData['gitlabUserNames[]'] = [];
|
||||
for(i in bindData)
|
||||
{
|
||||
postData['gitlabUserNames[]'].push(bindData[i].gitlabID);
|
||||
postData['gitlabUserNames[' + bindData[i].gitlabID + ']'] = bindData[i].gitlabUser;
|
||||
postData['zentaoUsers[' + bindData[i].gitlabID + ']'] = formData['zentaoUsers[' + bindData[i].gitlabID + ']'];
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
$.ajaxSubmit({
|
||||
url: $.createLink('gitlab', 'bindUser', 'gitlabID=' + gitlabID + '&type=' + type),
|
||||
data: postData
|
||||
|
||||
@@ -50,7 +50,7 @@ form
|
||||
array(
|
||||
'text' => $lang->save,
|
||||
'btnType' => 'primary',
|
||||
'onClick' => jsRaw("() => {bindUser()}")
|
||||
'onClick' => jsRaw("bindUser")
|
||||
),
|
||||
array(
|
||||
'text' => $lang->goback,
|
||||
|
||||
@@ -15,7 +15,7 @@ window.renderGitlabUser = function(result, {row})
|
||||
return result;
|
||||
}
|
||||
|
||||
window.bindUser = function()
|
||||
window.bindUser = function(e)
|
||||
{
|
||||
const myDTable = $('#table-gogs-binduser').zui('dtable');
|
||||
const formData = myDTable.$.getFormData();
|
||||
@@ -25,10 +25,12 @@ window.bindUser = function()
|
||||
postData['gogsUserNames[]'] = [];
|
||||
for(i in bindData)
|
||||
{
|
||||
postData['gogsUserNames[]'].push(bindData[i].gogsID);
|
||||
postData['gogsUserNames[' + bindData[i].gogsID + ']'] = bindData[i].gogsUser;
|
||||
postData['zentaoUsers[' + bindData[i].gogsID + ']'] = formData['zentaoUsers[' + bindData[i].gogsID + ']'];
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
$.ajaxSubmit({
|
||||
url: $.createLink('gogs', 'bindUser', 'gogsID=' + gogsID + '&type=' + type),
|
||||
data: postData
|
||||
|
||||
@@ -50,7 +50,7 @@ form
|
||||
array(
|
||||
'text' => $lang->save,
|
||||
'btnType' => 'primary',
|
||||
'onClick' => jsRaw("() => {bindUser()}")
|
||||
'onClick' => jsRaw("bindUser")
|
||||
),
|
||||
array(
|
||||
'text' => $lang->goback,
|
||||
|
||||
Reference in New Issue
Block a user