Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Incorrect Capabilities Checked #5096
    TownNews.com
    Participant

    Thank you for your prompt response Vladimir! The new version displays capabilities as expected on my test environment.

    in reply to: Incorrect Capabilities Checked #5085
    TownNews.com
    Participant

    The affected JavaScript looks like this:

    
        jQuery('.ure-cap-cb').each(function () { // go through all capabilities checkboxes
            jQuery(this).prop('checked', response.caps.hasOwnProperty(this.id));
        }); 
    

    But should be more like:

    
        jQuery('.ure-cap-cb').each(function () { // go through all capabilities checkboxes
    		if (response.caps.hasOwnProperty(this.id) && response.caps[this.id]) {
    			jQuery(this).prop('checked', true);
    		} else {
    			jQuery(this).prop('checked', false);
    		}
        }); 
    

    This correctly checks boxes with true values and unchecks boxes with false values.

Viewing 2 posts - 1 through 2 (of 2 total)