Page MenuHomePhabricator

Allow FormSpecialPage to have multiple final submit buttons
Closed, InvalidPublic

Description

Special:RenameUser has two final submit buttons on its form: one for "submit", and the other for "show block log for user".

However, FormSpecialPage doesn't allow this: it only lets us have one submit button at the end. Others have to be in the main form table structure, making porting RenameUser to FormSpecialPage difficult.

It should be possible to add multiple final submit buttons within the "usual channels" of getFormFields().

(That said, maybe the "show block log" button should actually be a hyperlink?)

Event Timeline

MC8 created this task.May 25 2015, 7:16 AM
MC8 raised the priority of this task from to Needs Triage.
MC8 updated the task description. (Show Details)
MC8 added a project: MediaWiki-Special-pages.
MC8 added a subscriber: MC8.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 25 2015, 7:16 AM

You can use HTMLForm::suppressDefaultSubmit() in FormSpecialPage::alterForm, and then add multiple buttons manually via the normal form fields.

(That said, maybe the "show block log" button should actually be a hyperlink?)

Yes

Glaisher closed this task as Invalid.Aug 10 2015, 4:43 PM
Glaisher claimed this task.
Glaisher added a subscriber: Glaisher.

Per above.