Commit 2bcb9035 authored by Phil Hughes's avatar Phil Hughes

Fixed date input not disabling

parent b08ea890
...@@ -58,8 +58,10 @@ ...@@ -58,8 +58,10 @@
if ($link.data('revert')) { if ($link.data('revert')) {
const memberListItem = this.getMemberListItem($link.get(0)); const memberListItem = this.getMemberListItem($link.get(0));
const toggle = memberListItem.querySelectorAll('.dropdown-menu-toggle')[0]; const toggle = memberListItem.querySelectorAll('.dropdown-menu-toggle')[0];
const dateInput = memberListItem.querySelectorAll('.js-access-expiration-date')[0];
toggle.disabled = true; toggle.disabled = true;
dateInput.disabled = true;
this.overrideLdap(memberListItem, $link.data('endpoint'), false); this.overrideLdap(memberListItem, $link.data('endpoint'), false);
} else { } else {
$btn.closest('form').trigger('submit.rails'); $btn.closest('form').trigger('submit.rails');
...@@ -109,9 +111,11 @@ ...@@ -109,9 +111,11 @@
const btn = e.currentTarget; const btn = e.currentTarget;
const memberListItem = this.getMemberListItem(btn); const memberListItem = this.getMemberListItem(btn);
const toggle = memberListItem.querySelectorAll('.dropdown-menu-toggle')[0]; const toggle = memberListItem.querySelectorAll('.dropdown-menu-toggle')[0];
const dateInput = memberListItem.querySelectorAll('.js-access-expiration-date')[0];
this.showLDAPPermissionsWarning(e); this.showLDAPPermissionsWarning(e);
toggle.removeAttribute('disabled'); toggle.removeAttribute('disabled');
dateInput.removeAttribute('disabled');
this.overrideLdap(memberListItem, btn.dataset.endpoint, true); this.overrideLdap(memberListItem, btn.dataset.endpoint, true);
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- can_admin_member = can?(current_user, action_member_permission(:update, member), member) - 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) - 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 %span.list-item-name
- if user - if user
= image_tag avatar_icon(user, 40), class: "avatar s40", alt: '' = image_tag avatar_icon(user, 40), class: "avatar s40", alt: ''
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
%span.visible-xs-block %span.visible-xs-block
Delete Delete
= icon('trash', class: 'hidden-xs') = 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", %button.btn.btn-default.btn-ldap-override.js-ldap-permissions{ type: "button",
"aria-label" => "Edit permissions", "aria-label" => "Edit permissions",
data: { name: user.name, id: dom_id(member) } } data: { name: user.name, id: dom_id(member) } }
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
= icon("pencil", class: "hidden-xs hidden-sm") = icon("pencil", class: "hidden-xs hidden-sm")
- else - else
%span.member-access-text= member.human_access %span.member-access-text= member.human_access
- if member.ldap - if member.ldap && can_admin_member
%li.alert.alert-member-ldap{ style: "display: none;" } %li.alert.alert-member-ldap{ style: "display: none;" }
%p %p
= user.name = user.name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment