mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Adding edit and delete users from system.
This commit is contained in:
parent
07a8496542
commit
45b78101c8
5 changed files with 88 additions and 5 deletions
|
|
@ -6,6 +6,7 @@ Template.userMgmt.onCreated(function() {
|
|||
|
||||
Template.userMgmt.onRendered(function() {
|
||||
$('select').formSelect();
|
||||
$('.modal').modal();
|
||||
});
|
||||
|
||||
Template.userMgmt.helpers({
|
||||
|
|
@ -29,7 +30,8 @@ Template.userMgmt.events({
|
|||
|
||||
let userId = this._id;
|
||||
// take action
|
||||
console.log("Edit called on: " + userId);
|
||||
Session.set("usersId", userId);
|
||||
$("#userInfoModal").modal('open');
|
||||
},
|
||||
"click .deleteUser" (event) {
|
||||
event.preventDefault();
|
||||
|
|
@ -41,8 +43,6 @@ Template.userMgmt.events({
|
|||
Session.set("item", "User");
|
||||
Session.set("view", "Users");
|
||||
Session.set("method", "delete.userFromSys");
|
||||
Meteor.setTimeout(function() {
|
||||
$('.modal').open('modalDelete');
|
||||
}, 150);
|
||||
$('#modalDelete').modal('open');
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue