diff options
-rw-r--r-- | Vote.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -235,8 +235,12 @@ class VoteHooks { ->addHeaderHtml('<h3>' . wfMessage('vote-add-your-vote')->inLanguage($parser->getTargetLanguage()) . '</h3>') ->addFooterHtml('<script type="application/json" data-votes>'. json_encode($votes) . '</script>'); + $html = $form->getHTML(false); + // dirty hack to work around https://phabricator.wikimedia.org/T319216 - return str_replace('type="radio"', 'type="radio" required', $form->getHTML(false)); + $html = str_replace('type="radio"', 'type="radio" required', $html); + + return $html; } } |