Commit graph

1113 commits

Author SHA1 Message Date
Timo Tijhof 93351fb7d9 Use native <input required> instead of JS-based disabled toggling
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
2021-05-21 21:04:02 +01:00
Translation updater bot b1decab75c Localisation updates from https://translatewiki.net.
Change-Id: Iec45df1521ae60ba3078f245b5fef569cfbb8a12
2021-05-19 08:43:09 +02:00
Translation updater bot a2ca0675b1 Localisation updates from https://translatewiki.net.
Change-Id: I3bebb0707db5d267dee463d8447c22cbb00f9e52
2021-05-11 09:06:47 +02:00
libraryupgrader a32e73d3dd build: Updating npm dependencies
* grunt: 1.3.0 → 1.4.0
* lodash: 4.17.19 → 4.17.21
  * https://npmjs.com/advisories/1673 (CVE-2021-23337)
* hosted-git-info: 3.0.7 → 3.0.8
  * https://npmjs.com/advisories/1677 (CVE-2021-23362)
* postcss: 7.0.35 → 8.2.15
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)

Change-Id: I81e4d036abdf1254a48ceaa1d7ad8fa975b9dc82
2021-05-11 02:05:54 +00:00
Translation updater bot a7393ca133 Localisation updates from https://translatewiki.net.
Change-Id: I6af3eab01e1d2303c2e24ba62d9183b54a0d16dc
2021-05-07 08:41:56 +02:00
Translation updater bot adf5c0229d Localisation updates from https://translatewiki.net.
Change-Id: I7d76774741a679ec263cf7639c1aac4155a07315
2021-05-06 08:54:22 +02:00
libraryupgrader 0045917eed build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

Change-Id: I56b6cf05a94ffd68dd11d230e71f3360e87416cd
2021-05-05 03:57:17 +00:00
jenkins-bot 31db12da9e Merge "Replace use of deprecated $.debounce()" 2021-04-30 01:12:35 +00:00
Sébastien Beyou 253eb5e85a Replace use of deprecated $.debounce()
Bug: T213426
Change-Id: I1502a1bd68ea260e94a47fcce047bafce3e47f0b
2021-04-30 00:49:27 +00:00
Translation updater bot 1b9fbd5f85 Localisation updates from https://translatewiki.net.
Change-Id: I1d903797d1efb7d6a4732b3f4bec6c780a91735d
2021-04-28 16:43:11 +02:00
Translation updater bot faa11c4ba9 Localisation updates from https://translatewiki.net.
Change-Id: I8ea5a3151e85cd89119efbac8b5d82c5b42e444b
2021-04-28 08:48:46 +02:00
Translation updater bot d9e384b822 Localisation updates from https://translatewiki.net.
Change-Id: I64cbb3851123d5ecd1b0ba64f6aff63311bd18a9
2021-04-22 09:31:40 +02:00
Translation updater bot bb44efbd82 Localisation updates from https://translatewiki.net.
Change-Id: Id6f111264559eb35cc12fee4771605ea718219c2
2021-04-19 08:50:42 +02:00
libraryupgrader 9c77fbfc35 build: Updating eslint-config-wikimedia to 0.20.0
Change-Id: Ibc32f4fa6d50e05c879e3f4e5b947abd137d000b
2021-04-16 23:42:30 +00:00
Translation updater bot 92ea222e97 Localisation updates from https://translatewiki.net.
Change-Id: I339f2bda0e09ea17a45d727824aca44a0cff99f7
2021-04-12 08:37:56 +02:00
Translation updater bot 267a78f5c9 Localisation updates from https://translatewiki.net.
Change-Id: I92bcd0493f79a7ba75030566a4fae57e099dbf7d
2021-04-07 08:51:52 +02:00
Translation updater bot 13cfa24324 Localisation updates from https://translatewiki.net.
Change-Id: Id3815fb48de275bdee53c83cf6057c8d5a61523a
2021-04-06 12:02:31 +02:00
Translation updater bot 0478b84ae8 Localisation updates from https://translatewiki.net.
Change-Id: Ifa8b762e47428ea433f872f5f0ab40415616565d
2021-03-26 08:50:09 +01:00
Translation updater bot 441fc0f178 Localisation updates from https://translatewiki.net.
Change-Id: Ic4a8664b85b87734a542315da01dd4b1098b8a89
2021-03-25 08:41:10 +01:00
jenkins-bot 86ee30fc5a Merge "Remove php entry point" 2021-03-14 16:10:12 +00:00
libraryupgrader 99a322ffdf build: Updating eslint-config-wikimedia to 0.19.0
Change-Id: I8c76db6be104c35283090d0c408a80c33a21ec8b
2021-03-13 22:43:22 +00:00
Umherirrender 908608e7b9 Remove php entry point
Deprecation notice since I66e5606b4dbd049eefab3461618b877219ca3e93

Bug: T140850
Change-Id: I44e32a0503fa4f9278c6dba52680883bc2b356fc
2021-03-13 00:11:05 +01:00
libraryupgrader 65690a1944 build: Updating eslint-config-wikimedia to 0.18.2
Change-Id: Ib476ba83f4eccda16fe7b9462f0d12c65de171c7
2021-03-07 00:10:22 +00:00
Translation updater bot cbd40a8d43 Localisation updates from https://translatewiki.net.
Change-Id: I193ebc7489a39ff9404c39240f422116ca457a41
2021-03-04 08:38:25 +01:00
Daimona Eaytoy c52e9fe34b Stop using deprecated Language methods
Change-Id: Idd3a255c60bb0c615e819a56f86b3d36377a0469
2021-02-27 14:22:36 +00:00
Translation updater bot 208eceea2d Localisation updates from https://translatewiki.net.
Change-Id: I38cb6089e80b96b983d7cc4980250ad09ad00f32
2021-02-25 08:38:46 +01:00
jenkins-bot c34e0ceb83 Merge "Fix "PHP Notice: Array to string conversion" when handling prefix/title params" 2021-02-22 09:12:20 +00:00
Translation updater bot b3566533cf Localisation updates from https://translatewiki.net.
Change-Id: Iba16eb192287abfd92f156b0fe0f0584e8c5800c
2021-02-22 08:52:19 +01:00
Bartosz Dziewoński 943d505e2e Fix "PHP Notice: Array to string conversion" when handling prefix/title params
$params['title'] can be an array if someone has messed with the query
parameters.

Use WebRequest::getText(), which guarantees strings (and which is
already used for 'prefix' earlier in this method).

Change-Id: I7b974067fdee22fc42c07fad98af4619fa850269
2021-02-19 21:28:55 +01:00
Translation updater bot 0ad3ed7bfc Localisation updates from https://translatewiki.net.
Change-Id: Ibc5ae18ea5cfd59e2cd881edb01e56af24f61649
2021-02-08 08:41:51 +01:00
Translation updater bot ae5840b1c4 Localisation updates from https://translatewiki.net.
Change-Id: I7d55210f88e8c98303435da71bdf01150c64b81b
2021-02-05 08:47:08 +01:00
libraryupgrader 1e90003379 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 34.0.0 → 35.0.0
* mediawiki/minus-x: 1.1.0 → 1.1.1

npm:
* eslint-config-wikimedia: 0.17.0 → 0.18.1

Additional changes:
* Added the "composer phan" command to conveniently run phan.
* Removing manual extensions for eslint.

Change-Id: Ie69a3ff54404c853d16cbf67d52e3da6a0b8174e
2021-01-29 21:32:48 +00:00
Translation updater bot e2ead12b12 Localisation updates from https://translatewiki.net.
Change-Id: I9aefc81e1deb4e5b44d281f9b8fd69011ce874e6
2021-01-18 08:38:22 +01:00
Translation updater bot 46b62b9e44 Localisation updates from https://translatewiki.net.
Change-Id: I033b4d2c49727807b68bc5f2d03362e79ae1fb63
2020-12-30 10:14:13 +01:00
Translation updater bot 77c99d377d Localisation updates from https://translatewiki.net.
Change-Id: I17130b6585403980ddd883d5c1ad7cd8908c224f
2020-12-28 10:38:48 +01:00
libraryupgrader 7625974e1f build: Updating mediawiki/mediawiki-phan-config to 0.10.6
Change-Id: Ib8ffb8af88e2b8f30d045d619d811fa9b7eb9344
2020-12-19 18:40:16 +00:00
Translation updater bot 5ec2a3bb00 Localisation updates from https://translatewiki.net.
Change-Id: If0d6109d8e9485db89097cefb3573daea7549518
2020-12-14 08:42:10 +01:00
libraryupgrader c8d50436ae build: Updating ini to 1.3.8
* https://npmjs.com/advisories/1589

Change-Id: Ib7b2b7e81ee68d97a97cb51b0863106f743da340
2020-12-13 08:35:46 +00:00
libraryupgrader 21b0022995 build: Updating mediawiki/mediawiki-phan-config to 0.10.5
Change-Id: I393ea42e14a75642604db6661e24572c9dd1144b
2020-12-10 10:27:41 +00:00
Translation updater bot 62f72c6541 Localisation updates from https://translatewiki.net.
Change-Id: Ifee4e46392d6ddd49c09c23896df6e1fb6988689
2020-12-07 08:45:24 +01:00
libraryupgrader 378141ece8 build: Updating mediawiki/mediawiki-codesniffer to 34.0.0
Change-Id: Ia8baeca8d8c905498a8b7072255e43ea31542725
2020-12-06 13:41:03 +00:00
Translation updater bot 1d81ddcdc1 Localisation updates from https://translatewiki.net.
Change-Id: I34c0b39949724d8683bd9bfeb1374650f633271f
2020-12-02 08:32:32 +01:00
libraryupgrader 5e7018809a build: Updating npm dependencies
* grunt-stylelint: 0.15.0 → 0.16.0
* stylelint-config-wikimedia: 0.10.1 → 0.10.3

Change-Id: Ied19a04dc35160773acd67d29e71e8fe2d936db9
2020-11-22 04:36:36 +00:00
libraryupgrader b486936019 build: Updating mediawiki/mediawiki-phan-config to 0.10.4
Change-Id: I47fcae7679d4b47d37c0f35d89c8fecb392bda63
2020-11-20 08:00:17 +00:00
Translation updater bot 291536c4c1 Localisation updates from https://translatewiki.net.
Change-Id: Id4ce19b41d4cac9ca7bb89204939b92e26adda0e
2020-11-16 08:37:19 +01:00
libraryupgrader 9d4a98e655 build: Updating mediawiki/mediawiki-codesniffer to 33.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate
* MediaWiki.Commenting.PropertyDocumentation.WrongStyle

Additional changes:
* Dropped .inc files from .phpcs.xml (T200956).
* Added the `wikimedia/mediawiki` profile in .eslintrc.json (T262222).

Change-Id: Ic7e903cc97b3766fcff467b382caf2a5a6bc5089
2020-11-04 02:06:23 +00:00
Translation updater bot daa1f7aadd Localisation updates from https://translatewiki.net.
Change-Id: I753c0b2b96e082f51b5db480b71589d5ad65f447
2020-10-20 08:30:11 +02:00
Translation updater bot 54afded868 Localisation updates from https://translatewiki.net.
Change-Id: Iabd86d3aabf1ee4dcf63b8b8a2966ca49874cec6
2020-10-14 08:28:04 +02:00
Translation updater bot e34c9d2758 Localisation updates from https://translatewiki.net.
Change-Id: I9842a99fc614cbf30ceba31099fd6bfe0af3f290
2020-10-01 08:30:28 +02:00
libraryupgrader 8d955e92e3 build: Updating mediawiki/mediawiki-phan-config to 0.10.3
Additional changes:
* Dropped .php5 files from .phpcs.xml (T200956).

Change-Id: I21a2f7be7966c925cc75bcc16dd374728b6a5468
2020-09-25 03:43:17 +00:00