Support for OOUI is added to FormAction, and subclasses can enable it as
required.
PurgeAction, RevertAction, WatchAction and UnwatchAction are converted
to OOUI, with minor changes to the forms to give them a neater appearance.
Bug: T160236
Change-Id: I5294e5d886e8641e9b63eabc9d7fa8ea93e0df96
* Make FormAction::getFormFields not abstract. In most cases this will just
be an empty array. This is in prep for RollbackAction as well.
* Remove redundant show() in WatchAction. This used to do custom stuff,
but after 77cdf1919 it does exactly the same as the parent FormAction::show.
* Don't add 'redirectparams' hidden field if there were no custom query parameters
(e.g. plain index.php?title=..&action=..)
Change-Id: Ia7f9bb0367c49a23179e9fefa9f529fa8aef8f52
The GET variant was already rarely used because our frontend enchances these links
with a click handler that uses AJAX to make a POST request to the API.
The index.php url, nor its token, were used for the majority of users.
Simplify this by stripping the 'token' query from these urls and requiring a POST
request for index.php?action=watch and unwatch.
* FormAction: Actually set a proper '<form action>' instead of letting HTMLForm
default to a confusing title path (e.g. /wiki/Pagename). Article path should
not be used for POST requests.
* WatchAction: Group all FormAction-related methods together.
* WatchAction: Make token consistent with other actions now that it is POST-only
(no "stronger" salt containing the page title).
* Remove ununsed mediawiki.page.startup dependency from mediawiki.page.watch.ajax.
* WatchAction: If accessed over GET directly (e.g. for users without javascript)
display a confirmation form that submits the token. Similar to PurgeAction.
Change-Id: I504f457e68a133bcfc418cff13b838080fec1008
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Change-Id: I64e8cfe478cb0ba438f40b0631d6e9049cdab567