| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: T353458
Change-Id: I3cf44dfe5425f2efb8409c83571c427447b053af
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This field uses a new widget based on OO.ui.MenuTagMultiselectWidget to
allow choosing from multiple options in a dropdown. It internally uses
a textarea ensuring that order of selected chips are preserved. No-JS
fallback is a textarea with no dropdown, but validations ensure that
arbitrary values entered are not accepted.
Bug: T382995
Change-Id: I4c8548a820c6035b28efdb47df8d7cbeeb407031
|
| |
| |
| |
| |
| |
| |
| | |
Provide protected helper methods for conditional escaping of labels.
Complain about the situation in a comment.
Change-Id: I32b3ebc5eb2d0892f2204a09a74ed00ee5274811
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use modern php syntax to call a callable.
Reduce the stack trace to improve performance
and better IDE and static analyzer support
Change-Id: I9ef131032a662a3b8db69aa7079dbd51f88f575a
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
HTMLTitleTextField uses a default value of `false` for namespace and
relative fields, hence the isset() checks in HTMLTitlesMultiselectField
getInputOOUI() are always true. Make the handling of these fields
consistent with HTMLTitleTextField::getInputWidget() which checks
namespace whether is false, and makes no check for relative.
Bug: T383133
Change-Id: Ie5443a2fcad4c9229f358fef0b4e3cb069ad3043
|
|\ \
| | |
| | |
| | | |
dropdown"
|
| |/
| |
| |
| |
| |
| |
| |
| | |
The backend of HTMLMultiSelectField does not allow reordering options,
so set `allowReordering: false` so that the frontend doesn't either.
Bug: T383277
Change-Id: Ie0fabe3537c76238dc144c9a958ac965b998ea5b
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Suppress remaining issues
Depends-On: I633ec05fe9ab6a815225911d942ecb79f21c428f
Depends-On: I186e799256fbaf5ee77558bd146f9418dd5eaacc
Depends-On: Ib84b7d71e8308a36409f30ecfd16e9de149e97b3
Depends-On: I26aa4adf31b4142248abe3e0f9aa8314512602a6
Depends-On: Icf24e208a487bafe3d1983536870aac19cfc4b5e
Depends-On: I99915b893f14cfbb2b54d9a6264b4f294200c4f2
Depends-On: Ia53b71dff3299837856ae3c004cd0227bd45e05b
Change-Id: I825dce05d4a6ca87acf25063e3664cb2d16f5db0
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
If the value is compared against a static ASCII string.
The UTF-8 normalization of getVal is not needed here.
Change-Id: Id85f1218a9d76b9ca69fb833348e531387089711
|
| |
| |
| |
| | |
Change-Id: Id6f9a2bfaa94ac97a635a23410e4b2efaf19ce95
|
|/
|
|
| |
Change-Id: If9217731be62694a0d953f6405da7677131315ad
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
isset() should only be used to suppress errors, not for null check.
When the property is always defined, there is no need to use isset.
Found by a new phan plugin (2efea9f989)
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#isset
Change-Id: I633ec05fe9ab6a815225911d942ecb79f21c428f
|
|/
|
|
| |
Change-Id: I36a5cebb63ef047bcf276553a9f18b62c80f8e88
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Created a new input widget and used it for the dropdown mode of
HtmlMultiSelectField. Dropped the `mw-htmlform-dropdown` class
to avoid being affected by old site/user js/css targeting it.
Also, generalised the creation of no-js fallback implementation,
so subclass of TagMultiselectWidget can provide a friendly
interface suited for their options' data.
Bug: T380995
Change-Id: Ieeb02ad875c6932cf594de6585cdda79771f7e50
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Use PendingTextInputWidget to provide a "loading" state and avoid the
ugly transition from the vanilla input field to OOUI.
Make sure the no-JS version never sees the pending state.
Based on the implementation in TagMultiselectWidget.
Bug: T382186
Change-Id: Iebb497a9c4cfb2c7b76fb4ffb7709e05c77a068a
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Can be used to specify a maximum number of selectable items.
Server-side, the constraint is always checked upon form submission (in
`validate()`), regardless of other options.
Client-side, this is only implemented in the dropdown version (OOUI's
MenuTagMultiselect), because CheckboxMultiselectInputWidget does not
support any bounds on the number of selected elements.
Bug: T380406
Change-Id: I26845cc215186fc4993cd7cba84222696dc06d81
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
Allow for the `HTMLTagFilter` widget to be customized by passing through
the parameters which should be used for the select input's options.
What:
- Support passing an `isActive` parameter to display all tags (`false`)
or only active tags (`true`)
- Support passing a `useAllTags` parameter to use all on-wiki tags ('`true`)
or only software-defined tags (`false`)
Bug: T378622
Change-Id: I73b5566fd54e416cc01fa53f5463a7dd785f857f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Namespace select inputs already support an 'exclude' parameter, ignoring
any namespaces that match ids in that array. For
Special:GlobalContributions, it would be useful to have the opposite -
an array of namespaces to be included, as it only wants to support
filtering on common namespaces.
- Allow an 'include' parameter to be passed through to the namespace
select input
- Support 'include' in Html inputs and OOUI inputs
TODO: Support 'include in Codex inputs (see T378582)
Bug: T378179
Change-Id: I4170beb588292fbec26926ca3afe559c25de9f55
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* This change introduces two new optional parameters to the 'allusers'
API call named 'excludenamed' and 'excludetemp' that allows filtering
accounts based on whether they're named accounts or temporary
accounts. This is tested by using the temporary matchPattern
configured with $wgAutoCreateTempUser.
* User widgets that call 'allusers' have been updated so that
'excludenamed' and 'excludetemp' can be optionally set so that named
or temporary accounts may not returned with user suggestions.
Bug: T332030
Change-Id: I6563ae610017fd1cd35c36ba65906041f7f68c4b
|
|
|
|
|
|
|
|
|
|
| |
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.
Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.
Change-Id: I1f306a3925d6768209a06e70082598b2f70cd319
|
|
|
|
|
|
| |
Also changed visiblity of some to private
Change-Id: I113b040321d27c84fe9b807c162736909e96fb20
|
|
|
|
|
|
|
|
| |
This touches various production classes and maintenance scripts.
The code should do the exact same as before. The main benefit is that
the syntax avoids any repetition.
Change-Id: I5c552125469f4d7fb5b0fe494d198951b05eb35f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* In 19238b429ff00fd872ba035485117ae6a32df64c, the
ContributionsSpecialPage class was modified to not perform
queries if the submitted form data was not determined to
be valid.
* This was necessary to allow IPContributions in CheckUser to
not run the query if the form was invalid.
* However, this broke looking up contributions from IPs that have
the UseMod wiki format (i.e. "xxx" instead of the last octet of
an IPv4 address) because the HTMLUserTextField class does not
consider these as valid IP addresses.
* Fixing this is necessary to allow looking up contributions from
these IPs in the contribution pagers.
What:
* Update HTMLUserTextField to have a 'usemodwiki-ipallowed' option
that when specified as true will allow IP addresses in with the
UseMod wiki format.
** This is done via the regex used by UserDef::processUser which
determines if an IP is a UseMod wiki IP
** This option is only used if the 'ipallowed' option is also set
to true.
* Update ContributionsSpecialPage::getTargetField to specify that
the 'target' field should allow UseMod wiki IP addresses.
* Add tests for the changes to HTMLUserTextField and also a
regression test via SpecialContributionsTest.
Bug: T370413
Change-Id: I2b1d981a21c7b85c22a371708776c7ca127dec4c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure CodexHTMLForm reflects HTML changes made to Codex components,
Radio and Checkbox.
- Changed the top level element from `span` to `div` in HTMLRadioField.
- Update test in HTMLRadioFieldTest.
HTMLCheckboxField already has a top-level `div` so no changes are
needed.
Bug: T370689
Change-Id: I0b7e5369e23b1a95e431014d7b22f3f1064b3dba
|
|
|
|
|
|
|
| |
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: Ia35b2d3105880631dd26ec974068b000ac7f4b6b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
HTMLMultiSelectField used the jquery.chosen library, but only for the
legacy display format, and only if the 'dropdown' option was passed.
There is only one form that passes the 'dropdown' option
(SpecialActiveUsers), and that form uses the OOUI display format, so
this code is unused.
Also remove the htmlform-chosen-placeholder i18n message, which is now
unused as well.
Bug: T53443
Change-Id: Ie4f9fff322ae26fbdf9eae1b3634d1b04e746179
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was asked in a patch review to apply fully import
InvalidArgumentException where possible. I was guessing some
of my other already merged patches have but turned out such
thing exists other places style so for the sake of consistency
I've turned rest of inline import of the specific exception at
top of the file.
There are instances of source files that aren't in any namespace but
have fully qualified import which this patch doesn't touch.
Change-Id: I4071fc698b65746d9594cf4d5f45bae82843d436
|
|
|
|
|
|
|
|
|
| |
This patch introduces a namespace declaration for the
MediaWiki\Json to FormatJson and establishes a class
alias marked as deprecated since version 1.43.
Bug: T353458
Change-Id: I5e1311e4eb7a878a7db319b725ae262f40671c32
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces a new namespace declaration,
MediaWiki\Xml and adds Xml and XmlSelect to it
and establishes class aliases marked as deprecated
since version 1.43.
Bug: T353458
Change-Id: I45cccd540b6e15f267d3ab588a064fbeb719d921
|
|
|
|
|
|
| |
The Codex implementation wraps HTMLSelectField.
Change-Id: I4241cb66d531e359534005b774a0951194a79edd
|
|
|
|
|
|
|
|
| |
Fix the real issues found by this sniff, and convert the remaining
false positive ignores to per-line ignores so that any more real issues
won't be added.
Change-Id: I18e75d59df327e2d93a3a487c115e92b9f268722
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a static method that returns the HTML for a Codex button.
CodexHTMLForm::getButtons() and HTMLButtonField::getInputCodex()
calls the static method and passes in a list of attributes,
flags, and the button label needed to build the Codex button.
This patch changes the way the Codex submit button is created. In a
previous patch, the submit button was an instance of HTMLSubmitField.
Bug: T361406
Change-Id: I046de61d4808f034335254e9a9c853f133d66a9b
|
|
|
|
|
|
|
|
| |
- Put select or fields side-by-side and apply form guidelines margin
- Put select and fields underneath with correct margins
- Indent connected components to Radio above visually
Change-Id: I7d262f533122cff5cf6e7be26af40090232c359e
|
|
|
|
|
|
|
|
| |
Was only there for IE 6 & 7, which are gladly not supported in our
infrastructure and codebase for some years now.
Bug: T234582
Change-Id: I111ec7c45f04caf82a796b701baf206ebbc0540b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`$this->mOptionsLabelsNotFromMessage` is set when calling
`$this->getOptions()`, meaning the previous code wasn't actually seeing
its expected value. Compare with the `getInputOOUI` implementation,
where the ternary is inside the foreach loop.
So, do the same thing for Codex and choose the function to use inside
the loop. Also use the full method name in both cases instead of
indirect calls, as it makes the code easier to analyze statically (also,
the call itself is pretty simple).
Follow-up to I73b2e95cff.
Change-Id: Ie6b626fa4f9822f76bf202c5ed66ec16c17dc422
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
HTMLInfoField overrides getDiv(), getTableRow() and getOOUI() to output
the raw value if 'rawrow' is set. Override getCodex() too, so that
'rawrow' also works correctly in CodexHTMLForm.
This caused a bug where going to
Special:UserLogin?warning=mobile-frontend-watchlist-purpose would show a
message box that was incorrectly wrapped in a cdx-field div. That seems
to have been harmless, but it's incorrect behavior and could cause
styling bugs in the future.
Change-Id: I1fd4e2e53f9e03561fe300b6924e44cf222db3c9
|
|/
|
|
| |
Change-Id: I40c7f93ac5ba71a6a3c8a1caa15da6a6be7e331b
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add the 'option-descriptions', option-descriptions-messages' and
'option-descriptions-messages-parse' settings to HTMLRadioField, which
allow setting descriptions for each option.
For simplicity, only support this for HTMLRadioField, and only for
Codex. See also T324268 for a previous stalled attempt to implement this
for OOUI, which ran into issues.
Bug: T359019
Change-Id: I38116bb2fa3086408d3e2b47e5fe020b30f9729a
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds support for all Codex Buttons by removing the
hard-coded values in the flag class array ($flags).
This patch adds the `cdx-button` class to class
attributes. It maps each flag in `$this->mFlags`
array to the corresponding CSS class name and
appends each flag class to the flag class array.
This ensures that all flag classes defined in
$flags are included in the HTML output.
Flags include 'progressive', 'destructive', 'primary',
and 'quiet'.
Flag classes include:
- cdx-button--action-progressive
- cdx-button--action-destructive
- cdx-button--weight-primary
- cdx-button--weight-quiet
Bug: T359018
Change-Id: I4ceaa3ef484f654bd908479d27ce0d32ed099d86
|
|/
|
|
|
|
|
|
|
|
|
| |
HTMLHiddenField does some black magic by outputting nothing and then
adding a hidden field to the form somewhere else. This black magic
wasn't updated for CodexHTMLForm, so it broke on forms that use Codex
(specifically, the login form, where CAPTCHAs are added using
HTMLHiddenField).
Bug: T360717
Change-Id: I2faec05d809b926b2ec2dedaceb7c74a445e06b2
|
|\ |
|