* Finish task #59436,59435.

This commit is contained in:
caoyanyi
2022-07-04 15:58:16 +08:00
parent 4bacc1b95f
commit 80bbce28ae
3 changed files with 31 additions and 2 deletions
+13 -1
View File
@@ -583,10 +583,22 @@ class gitlab extends control
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browseUser', "gitlabID=$gitlabID")));
}
$userPairs = $this->loadModel('user')->getPairs('noclosed|noletter');
$users = $this->loadModel('user')->getList();
$bindedUsers = $this->gitlab->getUserAccountIdPairs($gitlabID);
$userPairs = array('' => '');
$userInfos = array();
foreach($users as $key => $user)
{
if(!isset($bindedUsers[$user->account]))
{
$userPairs[$user->account] = $user->realname;
$userInfos[$user->account] = $user;
}
}
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->user->create;
$this->view->userPairs = $userPairs;
$this->view->users = $userInfos;
$this->view->gitlabID = $gitlabID;
$this->display();
}
+17 -1
View File
@@ -1,4 +1,20 @@
$(document).ready(function()
{
setAvatar();
});
$('#account').change(function()
{
var account = $(this).val();
var user = users[account];
var name = '';
var email = '';
if(account && user)
{
name = user.realname;
account = user.account;
email = user.email;
}
$('#name').val(name);
$('#username').val(account);
$('#email').val(email);
})
});
+1
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('users', $users);?>
<div id='mainContent' class='main-row'>
<div class='main-col main-content'>
<div class='center-block'>