Page MenuHomePhabricator

Use UsersMultiselectWidget in SecurePoll create form
Closed, ResolvedPublic3 Estimated Story PointsJan 12 2021

Description

The create form uses HTMLFormFieldCloner to allow multiple user names to be added as poll admins.

After T208687: Convert SecurePoll to use OOUI this can be replaced with a UsersMultiselectWidget, which we can configure to allow user names but not IP addresses.

We should deprecate the validation callback CreatePage::checkUsername, which will no longer be needed.

Event Timeline

Niharika triaged this task as Medium priority.Jan 6 2021, 5:07 PM
Niharika edited projects, added MediaWiki-extensions-SecurePoll; removed IP Info.
ARamirez_WMF set the point value for this task to 3.Jan 6 2021, 5:13 PM
ARamirez_WMF changed the subtype of this task from "Task" to "Deadline".

Change 655021 had a related patch set uploaded (by STran; owner: STran):
[mediawiki/extensions/SecurePoll@master] Use UsersMultiselectWidget to set election admins and validate that users are members of the electionadmin group

https://gerrit.wikimedia.org/r/655021

@Tchanders Thanks for the heads up! I don't think this widget has any styles. I grep'ed and didn't see anything but please let me know if I missed something 🙇

@STran No worries! TagMultiselectWidget is the parent of UsersMultiselectWidget - we should add the styles for that widget so that the loading bar and multiline input are hidden when appropriate. Otherwise the widget looks like this before JS loads:

image.png (274×718 px, 5 KB)

(In case I haven't mentioned this before, core ResourceLoader modules are defined in Resources.php so you can see the styles loaded by this module there.)

Change 655021 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Update admin selection input for SecurePoll create/edit

https://gerrit.wikimedia.org/r/655021

Change 655481 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/SecurePoll@master] Fix message key in CreatePage validation callback

https://gerrit.wikimedia.org/r/655481

Change 655481 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Fix message key in CreatePage validation callback

https://gerrit.wikimedia.org/r/655481