*-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
In some exotic use cases where the form is rendered straight from
a successful submit this prevents unexpected button text changes.
Change-Id: I61619b6222d9fb29c63ce7c1f3ceff512143c4f7
Fix the OOUI field element implementation to conditionally add
labels to the FieldLayout (only if the label isn't empty). Also
add setShowEmptyLabel( false ) to HTMLButtonField (labels usually
aren't set outside of the button, the button itself should have a label).
Bug: T129821
Change-Id: I0499bb82245273519e77c80e78bc431588875a85
Depends on I0e5c956b9358b510c8473b1cfe6465ea1b5c07ef in OOjs UI.
This mostly reverts dd04b31052 and parts
of e85bd04bcd.
In addition to cleanup, it fixes bugs in HTMLFormFieldWithButton
(which did not add some attributes in OOUI mode) and HTMLMultiSelectField
(which did not do the mapping, losing some attributes in OOUI mode).
Change-Id: I0d1a5288e9edb73a0c3a8431feca9fcc67b72b6a
Submit buttons, whether via HTMLForm::addButton() or HTMLSubmitField,
are difficult to use effectively when the submitted value has to match
the internationalized display label. HTML5 (and HTML4 for that matter)
already has <button> that does what we need, we just need to actually
use it.
But for IE6 and IE7, we can't use <button> because the browser doesn't
handle them correctly. Sniff those browsers to avoid their bugginess
(which the OOUI version should have been doing already for IE6, but
wasn't).
Bug: T121584
Change-Id: I7e15331efb162275c4116bcae61f19d6b884cbe3
- Removed space after cast
- Removed spaces in array index
- Removed double spaces
- Added spaces around string concat
- Fixed mixed tabs and spaces at begin of line
Change-Id: I38e849723f055d2d4c05cba72f5c245a28e8d5da
The @return doxygen parameter can take a class with a namespace, but
the \ needs to be escaped with an additional \. "\value" is usually interpreted
as a special command.
Actually with "@return OOUI\Widget", e.g., you'll get this output in your docs:
return OOUI
and an error message in the doxygen generation with something like "unknown command \Widget".
With "@return OOUI\\Widget" you'll get the expected output:
return OOUI\Widget
without any error message.
Change-Id: I14c4d7521f81ddd8c7b56facc1f0ae34f86b2299
Flags added to a button or submit field in a non-OOUI form will be
handled now, too.
With activated wgUseMediaWikiUIEverywhere:
All flags will get the 'mw-ui-' prefix.
(mw-ui-button is added to the button automatically)
With deactivated wgUseMediaWikiUIEverywhere:
All flags will get the 'mw-htmlform-' prefix.
This allows HTMLForm users to add flags to only the button, without
setting them as a cssclas, which would be added to the wrapper elements,
too.
Bug: T102838
Change-Id: I121a966fb4db6649a6e1012187148d354b5534f0
An OOUI Button now adds the value as a label of the button, too. Enable
the HTMLForm descriptor to pass flags to the OOUI Button widget, which
defaults to nothing in HTMLButtonField and to 'primary' and 'constructive'
in HTMLSubmitField.
Change-Id: Ibf561453604a830862d4f64819c8418a9458cb12
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: Ifbb1da2a6278b0bde2a6f6ce2e7bd383ee3fb28a
It is already set for some fields in Special:Block, but are
discarded by HTMLForm and its fields.
Some notes:
- fields with multiple inputs (radio, select and other, select
or other) will have the same tabindex set on all elements
- Some items such as multi-select and check matrix are not yet
implemented
Change-Id: I3e1ba7f16f3a3183f231afcf60dd392ce6d6eb6b