Tighten organisation admin permissions & password reset workflow
This commit is contained in:
@@ -137,6 +137,33 @@ function bindMemberButtons(el, options) {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// Reset member password button
|
||||
el.find('.js-member-password').click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var userName = $(this).data('user_name');
|
||||
$("body").ufModal({
|
||||
sourceUrl: site.uri.public + '/modals/organisations/o/' + $(this).data('slug') + '/members/reset-password',
|
||||
ajaxParams: {
|
||||
slug: $(this).data('slug'),
|
||||
user_name: $(this).data('user_name')
|
||||
},
|
||||
msgTarget: $("#alerts-page")
|
||||
});
|
||||
|
||||
$("body").on('renderSuccess.ufModal', function() {
|
||||
var modal = $(this).ufModal('getModal');
|
||||
var form = modal.find('.js-form');
|
||||
|
||||
form.ufForm()
|
||||
.on("submitSuccess.ufForm", function() {
|
||||
// Navigate or reload page on success
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// function bindMemberCreationButton(el) {
|
||||
|
||||
Reference in New Issue
Block a user