From 352cea4a94038f3722b084f3fbc47e20061c5e9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Wed, 13 Sep 2017 21:58:25 +0200 Subject: [PATCH] Fix submit button id on Special:Preferences For reasons beyond human fathoming, the button had the id set to 'prefsubmit' in PHP code and then changed to 'prefcontrol' in JS code. This functionality has been carefully preserved across multiple rewrites of this code since 2004, when it was added in 30d0ccd0 (rSVN3618). Let's just set the id in PHP. Change-Id: Ib23bd0e481e73a51ff0a16731f47a2df11b2c1b8 --- includes/Preferences.php | 2 +- maintenance/dictionary/mediawiki.dic | 2 +- .../src/mediawiki.special/mediawiki.special.preferences.js | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/Preferences.php b/includes/Preferences.php index 0bb1d28af3..9349527d0a 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1363,7 +1363,7 @@ class Preferences { $htmlForm->setSubmitText( $context->msg( 'saveprefs' )->text() ); # Used message keys: 'accesskey-preferences-save', 'tooltip-preferences-save' $htmlForm->setSubmitTooltip( 'preferences-save' ); - $htmlForm->setSubmitID( 'prefsubmit' ); + $htmlForm->setSubmitID( 'prefcontrol' ); $htmlForm->setSubmitCallback( [ 'Preferences', 'tryFormSubmit' ] ); return $htmlForm; diff --git a/maintenance/dictionary/mediawiki.dic b/maintenance/dictionary/mediawiki.dic index e7ba8faf20..7c3c95d712 100644 --- a/maintenance/dictionary/mediawiki.dic +++ b/maintenance/dictionary/mediawiki.dic @@ -3181,7 +3181,7 @@ prefixsearchdisabled prefs prefsection prefsnologintext2 -prefsubmit +prefcontrol preload preloads preloadtitle diff --git a/resources/src/mediawiki.special/mediawiki.special.preferences.js b/resources/src/mediawiki.special/mediawiki.special.preferences.js index 63f2d9825b..6291f3f5ba 100644 --- a/resources/src/mediawiki.special/mediawiki.special.preferences.js +++ b/resources/src/mediawiki.special/mediawiki.special.preferences.js @@ -11,7 +11,6 @@ return this.id.replace( /^mw-prefsection/g, 'preftab' ); }; - $( '#prefsubmit' ).attr( 'id', 'prefcontrol' ); $preftoc = $( '#preftoc' ); $preferences = $( '#preferences' ); -- 2.20.1