Replacing 'mediawiki.ui/variables.less' @import with
new skin-aware 'mediawiki.skin.variables.less' standard.
Also
- replacing several static values with new Codex design token featuring
skin variables.
Bump to required MediaWiki core version >= v1.41.0.
Bug: T332541
Change-Id: I1ba1bed9b4f5d49014d2e51c116df8b0f320b949
Remove the JavaScript module and its logic to toggle the disabled
state on the submit button. Instead, let the browser handle this
natively by setting the `required` attribute, which naturally prevents
early submissions.
Retain the current styling for 99% of cases by using the
:required:invalid selector to target the submit button to make it
appear disabled. This slight duplication of styles is needed because,
despite the form effectively being disabled natively, the core
mediawiki-ui styles only account for :disabled on the button directly
and not e.g. inherited via form:invalid. It is also unclear whether
we would want that, since there is some value to be had from having
the form give a consistent look with a progressive button that can
be submitted even at the wrong time to yield an assistive message to
the required field, so hence handling this locally for now instead of
with a generalised approach.
In order to use the required true/false idiom, I have switched the
generating of the HTML string from the old Xml::element method
to Html::element. This means there is no need to store it in an array
first and conditionally set it since true/false will result in absence
or required="" as needed.
As side-effect from this, redundant attributes like value="" and
type="text" are ommitted from the output, just as MediaWiki core does
more generally.
Bug: T283303
Change-Id: I2c75e09dd3f89fa11fca311b4e1f8133946b01b1
'createboxButton' class was erroneously removed in Ia608324703987371
so add it back again. Also prefixed "inputbox-element" class with
a "mw-" for consitency as well.
Bug: T92611
Change-Id: I36718671e6012427a647de7a1cc712e3c8394ee1
For checkboxes and text input fields, not only for buttons.
Fix missing space between input and submit button in search2, too.
Follow up: Ia608324703987371aa66beccbac962024fc6e897
Bug: T63526
Change-Id: Id9fb22885b836c0dfe6a086e2ec45e2018244210
If the user does not enter a title in the <inputbox> for type=create
and hits the submit button, it opens the Main page for editing (or
view-source) due to empty title= param in URL. Greying out the submit
button until user enters the title solves the issue.
Bug: 61606
Bug: 62975
Change-Id: I5c6c34b90c6c499ef7cb96ad8d47fdbbcbbcd8a8