*-message(s) settings were documented as message key strings or arrays
of message key strings, but some actually accepted [key, params...]
arrays as well. They did not accept Message objects, which would be
the cleanest and most flexible method of message passing.
The patch adds a new method to process these settings (which accepts
a messages key, a [key, params...] array or a Message object), and
makes all *-message(s) usage call that.
Change-Id: Ida647973a58bea83fdbd53335e63b5a8615c16e4
Sometimes the submitted text is not expected to show up as default
when the form is redisplayed after an error; password fields are
the obvious example for this, but in some cases (e.g. two-factor
token) it is useful for a normal text field to act like that as well.
The patch adds a new 'persistent' flag to HTMLTextField, which
defaults to false for passwords and true otherwise.
Change-Id: If0a52f61aa061bbb55bfdc76321ace7d3eaed934
In some exotic use cases where the form is rendered straight from
a successful submit this prevents unexpected button text changes.
Change-Id: I61619b6222d9fb29c63ce7c1f3ceff512143c4f7
Deprecated since 1.21. Use in Gerrit extensions was replaced.
Bug: T122754
Depends-on: If9a2764c5c15be9c07d066a52543c4c9d97e0f35
Change-Id: If45eafca7ea332475eb864f04665d0a0bf1603d1
If the special page is opened without any value or redirect type,
it shouldn't emit a 404 status code, as the page exists and it should
be indexable.
With this change, Special:Redirect only emits a 404 status code, when
the value was not find for the redirect type.
Bug: T131328
Change-Id: I578b15058aed77b5f4fb296db862a6e534c0888e
This lets us capture some basic endpoint timing data that is
lacking now, such as upload API call time.
Change-Id: If0627e2d78d82b22ed6bdaaa0fa7fe5f20ef50b1
Unlike 'img_major_mime' and 'img_minor_mime', this shouldn't be
"inefficient", since there's an index on it.
Bug: T131157
Change-Id: I4985cade41c23ef68f5caf276d4934cf24de2bb6
We use a 'then' function to turn the pseudo-failure back into a success.
This also adjusts mw.Api to pass the actual result and jqXHR to the
failure function for non-HTTP errors. Sadly the existing parameters
passed on failure are something of a big mess, so this isn't as nice as
it might otherwise be to preserve compatibility.
Bug: T131129
Change-Id: Ic5da24edeac6285fbce0785f0789dddcd2dc15a9
This is about template parameters. They can be indexed by position (int) or
name (string). The returned value is always a string, or false (bool) on
failure.
Change-Id: I565210ad485505281246ef2bb3086a675b905976
This change adds a new method setAutocomplete to the class HTMLForm.
This method allows to set the HTML attribute autocomplete for the form.
This change uses this method to set autocomplete="off" for the preferences form.
Without autocomplete="off" the selections in the preferences get cached in
the browser. This can lead to wrong selected options when the settings get
changed on an other way, for example via API.
Bug: T131047
Change-Id: I2920383b5b8cfca3f1d546315f202985edf417d8