UsersMultiselectWidget class extends OOUI's MenuTagMultiselectWidget,
not CapsuleMultiselectWidget any more.
Change-Id: Iea7450a371720bed392dfedb1032bc8c63c89fc4
Directly use the UTF-8 encoding of the 'NO-BREAK SPACE' (U+00A0) instead of
the HTML/XML entities   or   or .
With the UTF-8 character the generated HTML is shorter and better to read.
Also change the special value for the label in HTMLForm from   to
U+00A0 but also support   for backward compability.
Bug: T154300
Change-Id: I882599ac1120789bb4e524c4394870680caca4f4
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '
(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)
Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).
Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
Previously we would always run the validation, and it would fail when
the field was empty, since empty string is not a valid title.
Respect the 'required' option (defined by HTMLFormField) and make it
default to true for compatibility with existing forms that might rely
on this.
Also add a TODO comment about a confusing special case in validation
code. I don't want to dig into that.
Change-Id: I93ad51ffe7bee597d2d127f4c5d6b2929ffc8f7e
Special:Block needs a date time selector for easier selection of expiry. To
accommodate this cleanly, a new Expiry Widget is created that handles this
logic.
Bug: T132220
Change-Id: I2853a2ca0ae6ccead3978f4bb50a77c2baa3a150
This updates the deletion forms, Special:Block, Special:EditTags,
Special:MovePage, Special:RevisionDelete, Special:Undelete, and
Special:UserRights to limit by code point count rather than by byte (or,
in some cases, by UTF-16 code unit).
Bug: T185948
Change-Id: I20d11d7cc4f58902cbcb6dda70af533bce6dd170
Clean up use of @codingStandardsIgnore
- @codingStandardsIgnoreFile -> phpcs:ignoreFile
- @codingStandardsIgnoreLine -> phpcs:ignore
- @codingStandardsIgnoreStart -> phpcs:disable
- @codingStandardsIgnoreEnd -> phpcs:enable
For phpcs:disable always the necessary sniffs are provided.
Some start/end pairs are changed to line ignore
Change-Id: I92ef235849bcc349c69e53504e664a155dd162c8
By adding an additional aria-label attribute to the tooltip,
we can ensure that every tooltip will be accessible
for accessibility tools like screen readers.
Works with Echo extension, but I am not sure if there
are extensions who are using the original-title attribute.
Tested with ChromeVox on Chrome 62.0.3202.94.
Bug: T54711
Change-Id: I19500c4e8ccbdcb8288b9c2299a29b3f8a31639d
placeholder is an html attribute, it does not support arbitrary
html, so ->text() is most appropriate, not full parse.
Follow up d3cd609e
Change-Id: Ia2aa5a001e19ee90e99936ef4f0dc879f182999f
This is really a workaround for an issue in a completely different place:
JS RadioSelectInputWidget internally uses `<input type="hidden">`
rather than real radio buttons, which does not work correctly with the
code in mediawiki.special.preferences.confirmClose.js. Ideally we would
change RadioSelectInputWidget to not do such weird things.
However, I think this is actually a good thing to do in general.
From the user's perspective, PHP RadioSelectInputWidget and JS
RadioSelectInputWidget look and behave the same, so there's no reason
to infuse and rebuild them.
This behavior was implemented in f50cee1375
in which unfortunately I did not document the reason for it. For other
fields it makes obvious sense (the JS widgets have improvements like
autocompletion, or at least look "pretty"), but I have no idea why
I did it for this one.
Bug: T180643
Change-Id: I53e50f8cda39466b2396b374e642c154487888bb
'Mediawiki\Widget\SelectWithInputWidget' is the only one that shows up
in the logs, but I tidied up a few others I came across.
Change-Id: I700dec858007a8013e6d7b9e37ddf518f223d8b7
Release notes:
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.5
Also, replace uses of `OOUI\TextInputWidget( [ 'multiline' => true ] )`
with `OOUI\MultilineTextInputWidget()` to avoid deprecation warnings
(which cause unit tests to fail).
Depends-on: I990b14982ffb72fe981040d02c7023d13f721aaa
Change-Id: If8312c60e1547a6177f5491011badb6576f54b21
The resulting HTML makes very little sense semantically, but no
worries, because so does the existing one for non-OOUI forms.
Change-Id: I99bf6341c58869f6322b9d9c780d9c66739d00b6
Set the ID on the main widget (mw.widgets.SelectWithInputWidget), so
that it can be infused by ID.
The dropdown/textbox by themselves can't be infused individually,
therefore IDs on them are pretty useless; remove those where they're
not necessary.
Follow-up to 8bd6605736.
Change-Id: If54dd48f1000e3e0f5a978428a5b622797b4f765
HTMLRestrictionsFieldTest::provideValidate only provide test cases with
\n, which fails on windows machine.
I see no reason to use the system depending constant here
Change-Id: I7caf2c4d06c84cac69e20e03d00a93bcd8e7d405
Some items in an HTMLCheckMatrix form field can be forced to be
on or off, in which case they're disabled. This adds three new
class names, so that (for example) Javascript can identify these
checkboxes. There are not currently any classes assigned to them.
Bug: T172585
Change-Id: I984020ce2437effb3ff5f186470105fd80d4a00f
It adds the ability to replace the current section ID escaping
schema (.C0.DE) with a HTML5-compliant escaping schema that is
displayed as Unicode in many modern browsers.
See the linked bug for discussion of various options that were
considered before the implementation. A few remarks:
* Because Sanitizer::escapeId() is used in a bunch of places without
escaping, I'm deprecating it without altering its behavior.
* The bug described in comments for Parser::guessLegacySectionNameFromWikiText()
is still there in some Edge versions that display mojibake.
Bug: T152540
Change-Id: Id304010a0342efbb7ef2d56c5b8b244f2e4fb2c5
Values returned by `Linker::tooltipAndAccesskeyAttribs()` and
`Linker::titleAttrib( ..., 'withaccess' )` include an accesskey
hint in the title text. This is unnecessary when used for OOjs UI
widgets, since after the changes from T168408 they display an
accesskey hint automatically.
Also fixed some other accesskey bugs in HTMLForm which probably
no one ever ran into.
Bug: T168408
Change-Id: I63285b5bce3341875a6d82eba059623bf105ca62
No idea why this was using content language to begin with, but it seems
like it should clearly use the user language instead.
Bug: T171817
Change-Id: I1763ffd8ee037dbb5dd94c410cb6a82e0f6b27e9
If the string value is '' (empty string), the array
value should be [] (empty array), not [''] (array of one element
which is an empty string).
Bug: T169384
Change-Id: I558f3890af05efb6eaa18403467c0a05f44af12a
The used phpcs has a bug, so the version 0.9.0 could not be enforced at the moment.
Will be fixed in next version, see T167168
Changed:
- Remove duplicate newline at end of file
- Add space between function and ( for closures
- and -> &&, or -> ||
Change-Id: I4172fb08861729bccd55aecbd07e029e2638d311
New widget and html form field, which allows selecting multiple
users using convenient single-line input (CapsuleMultiselectWidget)
Bug: T131492
Change-Id: I7b6ffe7fb47e0a7083e2a956156ab0f142444398
No longer needed after I08244addcf9b6eb96137895f28e7b750914fef5c.
Also remove datetime.js from mediawiki.htmlform module.
Change-Id: Ic2410c689de3f70f573fa1c71456e6d3f334f80b
Otherwise, after we allow HTML5 form validation attributes, these
buttons wouldn't work for non-JS users (unless the whole form was
otherwise valid).
Change-Id: Ia9c16849774c186b991280ea60fc5608ddd4cf42