Needs review
Project:
AJAX Poll
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Jan 2012 at 03:39 UTC
Updated:
8 Oct 2018 at 03:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
prashant.cI made this modification and it worked for me. Thanks
Comment #2
pavel ruban commentedI get this issue too & resolved it, but I had else one error:
When you don't choose any radio & click submit - form won't be validated & submit stay disabled, so you cant send new request untill page be reloaded. (reproduced in firefox). fixed.
Comment #3
pavel ruban commentedComment #4
podinfo commentedthanks very much #pavelRuban
Comment #5
pavel ruban commentedComment #6
jenlamptonI don't see a Drupal 6 (or Drupal 8) patch here that needs to be ported. I think maybe the status should have been Needs Review?
Comment #7
sgdev commentedA few comments about this patch.
I agree with the
removeAttradjustments. Those are absolutely necessary.I also agree there needs to be a call of
$pollWrapper.find('.messages').remove();However, by putting it insuccess, it does not handle this issue: https://www.drupal.org/project/ajax_poll/issues/2666930It needs to be in
beforeSubmittoo, so it ensures there are not duplicate error messages when not selecting an option and clicking "Vote" multiple times. To simplify things, I just added the line to this patch and closed the other issue.There is one other problem not being handled by this patch or any other I've seen. When a
$formgenerates an element using#submit, the assumption is being made by Ajax Poll that it is always rendered as<input>. This is just not the case, as for many sites the form button will be rendered as a<button>tag.I've updated the patch in #2 to be more flexible and allow a site to use either
<input>or<button>as form submits.Please review, thanks.