Mono Support Clearing All Roles from ~MonoX/Admin/UserManager.aspx 

Viewed 12331 time(s), 4 post(s), 10/23/2012 10:22:01 AM - by johnsamuel
10/23/2012 10:22:01 AM
429 Reputation 46 Total posts

Hi, when a new person joins the Community the right hand box in the line "Add user to roles" is blank. If we assign a role to that person it is then, as far as we can tell, not possible to return that box to be blank i.e. there has to be a minimum of one role. We want to return that box to be blank. How do we do that?

1
10/23/2012 12:47:58 PM
1849 Reputation 181 Total posts

You need to search for this function:

//remove selected item from the select element
function removeItem(listBoxID, maxDestinationItems, minItemsLeft, errorMsgControl, errorMinMsgControl)
{   
    var targetLB = document.getElementById(listBoxID);
 
  if (targetLB.length <= minItemsLeft)
  {
...
in file: "MonoX\Admin\controls\scripts\JSHelper.js" and you need to add "minItemsLeft = 0;" to this funtion:

//remove selected item from the select element
function removeItem(listBoxID, maxDestinationItems, minItemsLeft, errorMsgControl, errorMinMsgControl)
{   
  minItemsLeft = 0;
    var targetLB = document.getElementById(listBoxID);
 
  if (targetLB.length <= minItemsLeft)
  {
...
Please let me know is this was helpful for you.

2
10/26/2012 10:08:35 AM
25 Reputation 4 Total posts

doesn't this practically make it ignore the "minItemsLeft" param and treat it as 0?

3
10/26/2012 1:09:45 PM
1849 Reputation 181 Total posts

This was a bug and it is fixed. This fix will be available with next nightly build of the MonoX.

4
This is a demo site for MonoX. Please visit Mono Software for more info.