mirror of
https://github.com/go-gitea/gitea
synced 2024-11-16 15:14:24 +00:00
Add option to search for users is active join a team (#24093)
Adding a user in a team to enter a username gives a list of no active users --------- Co-authored-by: Jason Song <i@wolfogre.com>
This commit is contained in:
parent
cfe3d6e9b5
commit
ed81b608cb
@ -24,6 +24,7 @@ func Search(ctx *context.Context) {
|
|||||||
Keyword: ctx.FormTrim("q"),
|
Keyword: ctx.FormTrim("q"),
|
||||||
UID: ctx.FormInt64("uid"),
|
UID: ctx.FormInt64("uid"),
|
||||||
Type: user_model.UserTypeIndividual,
|
Type: user_model.UserTypeIndividual,
|
||||||
|
IsActive: ctx.FormOptionalBool("active"),
|
||||||
ListOptions: listOptions,
|
ListOptions: listOptions,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -11,7 +11,7 @@ export function initCompSearchUserBox() {
|
|||||||
$searchUserBox.search({
|
$searchUserBox.search({
|
||||||
minCharacters: 2,
|
minCharacters: 2,
|
||||||
apiSettings: {
|
apiSettings: {
|
||||||
url: `${appSubUrl}/user/search?q={query}`,
|
url: `${appSubUrl}/user/search?active=1&q={query}`,
|
||||||
onResponse(response) {
|
onResponse(response) {
|
||||||
const items = [];
|
const items = [];
|
||||||
const searchQuery = $searchUserBox.find('input').val();
|
const searchQuery = $searchUserBox.find('input').val();
|
||||||
|
Loading…
Reference in New Issue
Block a user