summaryrefslogtreecommitdiff
path: root/Vote.php
diff options
context:
space:
mode:
Diffstat (limited to 'Vote.php')
-rw-r--r--Vote.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/Vote.php b/Vote.php
index ffedcba..f1fd043 100644
--- a/Vote.php
+++ b/Vote.php
@@ -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;
}
}