The form for adding/editing a poll triggers a JavaScript error for users that do not have the administer polls permission. This causes the Poll Settings block to be collapsed without means to open it.
I have traced it to advpoll-form.js, line 56:
if ($("input.settings-writeins").attr("checked")) {
Apparently, when the user does not have the administer polls permission, settings-writeins is not there, $("input.settings-writeins") returns an empty list and the $("input.settings-writeins").attr() fails.
A possible fix is to change the line to this:
if ($("input.settings-writeins").length && $("input.settings-writeins").attr("checked")) {
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | advpoll_writein_js.patch | 1.04 KB | anders.fajerson |
Comments
Comment #1
anders.fajerson commentedThanks for the report. Here is a patch (which does the check a bit earlier).
Comment #2
ChrisKennedy commentedWow, this bug was solved nearly a year earlier than my recent commit. Sorry!
http://drupal.org/node/189418
Comment #3
anders.fajerson commentedI should have told you (or better yet, committed it)...