Button does not work

In the greylisting module (Virtualmin -> Email Messages -> Email Greylisting) the "select all" / "invert selection" buttons do not work. They are just dead.

Status: 
Closed (fixed)

Comments

I'm seeing this behavior too Jamie. I looked into it a bit, and I may have stumbled onto the cause.

The JavaScript error I receive is:

Uncaught TypeError: Cannot set property 'checked' of undefined

Looking at the source, the code in question is this here:

onClick='f = document.forms[0]; ff = f.d; ff.checked = true; r = document.getElementById("row_"+ff.id); if (r) { r.className = "mainsel" }; for(i=0; i<f.d.length; i++) { ff = f.d[i]; if (!ff.disabled) { ff.checked = true; r = document.getElementById("row_"+ff.id); if (r) { r.className = "mainsel" } } } return false'

The problem may be that there is another form in the HTML that actually appears before the "Whitelisted clients" form containing the select all / invert links (the first form is the one for enabling/disabling Postgrey).

I suspect the above code is accidentally referencing that first form in the first part of that line:

f = document.forms[0]

Thanks, I see the cause of this - it will be fixed in the next Virtualmin release.

Automatically closed -- issue fixed for 2 weeks with no activity.