Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4d58b76b
Commit
4d58b76b
authored
Nov 14, 2019
by
Utkarsh Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remote var from ldap_groups_select.js
parent
5aace8a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
ee/app/assets/javascripts/ldap_groups_select.js
ee/app/assets/javascripts/ldap_groups_select.js
+6
-10
No files found.
ee/app/assets/javascripts/ldap_groups_select.js
View file @
4d58b76b
/* eslint-disable
no-var, one-var,
consistent-return, func-names */
/* eslint-disable consistent-return, func-names */
import
$
from
'
jquery
'
;
import
Api
from
'
ee/api
'
;
import
{
__
}
from
'
~/locale
'
;
export
default
function
initLDAPGroupsSelect
()
{
var
groupFormatSelection
,
ldapGroupResult
;
ldapGroupResult
=
function
(
group
)
{
const
ldapGroupResult
=
function
(
group
)
{
return
group
.
cn
;
};
groupFormatSelection
=
function
(
group
)
{
const
groupFormatSelection
=
function
(
group
)
{
return
group
.
cn
;
};
import
(
/* webpackChunkName: 'select2' */
'
select2/select2
'
)
...
...
@@ -22,19 +21,16 @@ export default function initLDAPGroupsSelect() {
placeholder
:
__
(
'
Search for a LDAP group
'
),
minimumInputLength
:
1
,
query
(
query
)
{
var
provider
;
provider
=
$
(
'
#ldap_group_link_provider
'
).
val
();
const
provider
=
$
(
'
#ldap_group_link_provider
'
).
val
();
return
Api
.
ldapGroups
(
query
.
term
,
provider
,
groups
=>
{
var
data
;
data
=
{
const
data
=
{
results
:
groups
,
};
return
query
.
callback
(
data
);
});
},
initSelection
(
element
,
callback
)
{
var
id
;
id
=
$
(
element
).
val
();
const
id
=
$
(
element
).
val
();
if
(
id
!==
''
)
{
return
callback
({
cn
:
id
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment