mguinness / IdentityManagerUI

Identity management system for ASP.NET Core Identity.
MIT License
230 stars 63 forks source link

edit btn not work #15

Closed MautassimAshrafAli closed 2 years ago

MautassimAshrafAli commented 2 years ago

Edit btn in the first time I make role check it works but when I click in edit btn the second time the edit model does not show.

MautassimAshrafAli commented 2 years ago

I fix it 👍

try {
  $.each(data.roles, function (index, value) {
    cb=document.querySelectorAll("#editForm input[type='checkbox'][value='"+value+"']");
    for(i in cb) {
      cb[i].checked=true;
    }
  });
} catch (r) {
  alert(r);
}
cthue2 commented 1 year ago

I fix it 👍

try {
  $.each(data.roles, function (index, value) {
    cb=document.querySelectorAll("#editForm input[type='checkbox'][value='"+value+"']");
    for(i in cb) {
      cb[i].checked=true;
    }
  });
} catch (r) {
  alert(r);
}

Can you post your revised Users.cshtml? I am experiencing the same issue when a role name contains a space.