Commit 87a0501d authored by Phil Hughes's avatar Phil Hughes

Updates the member row when values changed

parent 52d2fd49
......@@ -14,14 +14,18 @@
inputs.datepicker({
dateFormat: 'yy-mm-dd',
minDate: 1,
onSelect: toggleClearInput
onSelect: function () {
$(this).trigger('change');
toggleClearInput.call(this);
}
});
inputs.next('.js-clear-input').on('click', function(event) {
event.preventDefault();
var input = $(this).closest('.clearable-input').find('.js-access-expiration-date');
input.datepicker('setDate', null);
input.datepicker('setDate', null)
.trigger('change');
toggleClearInput.call(input);
});
......
......@@ -15,7 +15,8 @@
addListeners() {
$('.project_member').on('ajax:success', this.removeRow);
$('.js-member-update-control').on('change', function () {
console.log($(this).val());
$(this).closest('form')
.trigger("submit.rails");
});
}
......
:plain
$("##{dom_id(@project_member)}").replaceWith('#{escape_javascript(render('shared/members/member', member: @project_member))}');
new gl.MemberExpirationDate();
var $listItem = $('#{escape_javascript(render('shared/members/member', member: @project_member))}');
$("##{dom_id(@project_member)} .list-item-name").replaceWith($listItem.find('.list-item-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