From: Bartosz DziewoƄski Date: Wed, 13 Sep 2017 19:58:25 +0000 (+0200) Subject: Fix submit button id on Special:Preferences X-Git-Tag: 1.31.0-rc.0~2111^2 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=352cea4a94038f3722b084f3fbc47e20061c5e9c;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' );