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 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 subscribed.

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 claimed this task.
Glaisher subscribed.

Per above.