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
2bcb9035
Commit
2bcb9035
authored
Nov 29, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed date input not disabling
parent
b08ea890
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
app/assets/javascripts/members.js.es6
app/assets/javascripts/members.js.es6
+4
-0
app/views/shared/members/_member.html.haml
app/views/shared/members/_member.html.haml
+3
-3
No files found.
app/assets/javascripts/members.js.es6
View file @
2bcb9035
...
...
@@ -58,8 +58,10 @@
if ($link.data('revert')) {
const memberListItem = this.getMemberListItem($link.get(0));
const toggle = memberListItem.querySelectorAll('.dropdown-menu-toggle')[0];
const dateInput = memberListItem.querySelectorAll('.js-access-expiration-date')[0];
toggle.disabled = true;
dateInput.disabled = true;
this.overrideLdap(memberListItem, $link.data('endpoint'), false);
} else {
$btn.closest('form').trigger('submit.rails');
...
...
@@ -109,9 +111,11 @@
const btn = e.currentTarget;
const memberListItem = this.getMemberListItem(btn);
const toggle = memberListItem.querySelectorAll('.dropdown-menu-toggle')[0];
const dateInput = memberListItem.querySelectorAll('.js-access-expiration-date')[0];
this.showLDAPPermissionsWarning(e);
toggle.removeAttribute('disabled');
dateInput.removeAttribute('disabled');
this.overrideLdap(memberListItem, btn.dataset.endpoint, true);
}
...
...
app/views/shared/members/_member.html.haml
View file @
2bcb9035
...
...
@@ -5,7 +5,7 @@
-
can_admin_member
=
can?
(
current_user
,
action_member_permission
(
:update
,
member
),
member
)
-
update_url
=
member
.
type
==
'GroupMember'
?
group_group_member_path
(
@group
,
member
)
:
namespace_project_project_member_path
(
@project
.
namespace
,
@project
,
member
)
%li
.member
{
class:
[
dom_class
(
member
),
(
"is-overriden"
if
member
.
override
)],
id:
dom_id
(
member
)
}
%li
.member
{
class:
[
dom_class
(
member
),
(
"is-overriden"
if
member
.
override
&&
can_admin_member
)],
id:
dom_id
(
member
)
}
%span
.list-item-name
-
if
user
=
image_tag
avatar_icon
(
user
,
40
),
class:
"avatar s40"
,
alt:
''
...
...
@@ -111,7 +111,7 @@
%span
.visible-xs-block
Delete
=
icon
(
'trash'
,
class:
'hidden-xs'
)
-
elsif
member
.
ldap
-
elsif
member
.
ldap
&&
can_admin_member
%button
.btn.btn-default.btn-ldap-override.js-ldap-permissions
{
type:
"button"
,
"aria-label"
=>
"Edit permissions"
,
data:
{
name:
user
.
name
,
id:
dom_id
(
member
)
}
}
...
...
@@ -120,7 +120,7 @@
=
icon
(
"pencil"
,
class:
"hidden-xs hidden-sm"
)
-
else
%span
.member-access-text
=
member
.
human_access
-
if
member
.
ldap
-
if
member
.
ldap
&&
can_admin_member
%li
.alert.alert-member-ldap
{
style:
"display: none;"
}
%p
=
user
.
name
...
...
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