The main motivation behind this patch is to get rid of this hack, which generates errors on my testsite form time to time:

// Multistep is set to TRUE as a hack to allow in_block to be accessed
// when voting via ajax in a block - there may be a better way to do this.
$form['#multistep'] = TRUE;

I also think this code is easier to grasp.

Added themable block. Only drawback I've found so far is that the "Older polls" link only shows up after a page refresh, but I think that's ok. The "cancel vote button" and "# votes" which was hidden before in the block can preferably be hidden with css instead.

If I get a review I commit this.

CommentFileSizeAuthor
advpoll_simplify_block.patch11.51 KBanders.fajerson

Comments

ChrisKennedy’s picture

Status: Needs review » Reviewed & tested by the community

Oh you hate that multistep hack so much :P You might read the discussion about it in the FormAPI 3 patch (http://drupal.org/node/138706).

Anyway, this patch looks fine to me. It needs to be re-rolled after the rich text change though.

anders.fajerson’s picture

Status: Reviewed & tested by the community » Fixed

I don't hate it, my server does :P

Re-rolled and commited, hopefully without errors...

Anonymous’s picture

Status: Fixed » Closed (fixed)