* Adjust bind user error.

This commit is contained in:
caoyanyi
2023-11-01 14:24:06 +08:00
parent 2bf333d4db
commit a6b73fbd59
6 changed files with 15 additions and 9 deletions
+4 -2
View File
@@ -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
+1 -1
View File
@@ -50,7 +50,7 @@ form
array(
'text' => $lang->save,
'btnType' => 'primary',
'onClick' => jsRaw("() => {bindUser()}")
'onClick' => jsRaw("bindUser")
),
array(
'text' => $lang->goback,
+4 -2
View File
@@ -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
+1 -1
View File
@@ -50,7 +50,7 @@ form
array(
'text' => $lang->save,
'btnType' => 'primary',
'onClick' => jsRaw("() => {bindUser()}")
'onClick' => jsRaw("bindUser")
),
array(
'text' => $lang->goback,
+4 -2
View File
@@ -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
+1 -1
View File
@@ -50,7 +50,7 @@ form
array(
'text' => $lang->save,
'btnType' => 'primary',
'onClick' => jsRaw("() => {bindUser()}")
'onClick' => jsRaw("bindUser")
),
array(
'text' => $lang->goback,