From: Fomafix Date: Fri, 27 Apr 2018 14:27:39 +0000 (+0200) Subject: installer: Do not wrongly hide namespace input field X-Git-Tag: 1.31.0-rc.1~3 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=a3335f4b3be7f5d7e279ccbbd06682cbc3541527;hp=c2fbbc80e6811a44c337c72b382ec77fa04fa38a;p=lhc%2Fweb%2Fwiklou.git installer: Do not wrongly hide namespace input field When the radio button is already on "other" then the input field for the namespace should not get hidden by JavaScript on load. Also remove the readonly attribute in HTML because the readonly attribute can not get removed with disabled JavaScript. Change-Id: I8cfde90d791765234572caf00b731881ac2eda48 (cherry picked from commit 31a472655b246df3c072d36959afcb7d2897889d) --- diff --git a/includes/installer/WebInstallerName.php b/includes/installer/WebInstallerName.php index 81a107dea3..50c88aec67 100644 --- a/includes/installer/WebInstallerName.php +++ b/includes/installer/WebInstallerName.php @@ -76,7 +76,7 @@ class WebInstallerName extends WebInstallerPage { $this->parent->getTextBox( [ 'var' => 'wgMetaNamespace', 'label' => '', // @todo Needs a label? - 'attribs' => [ 'readonly' => 'readonly', 'class' => 'enabledByOther' ] + 'attribs' => [ 'class' => 'enabledByOther' ] ] ) . $this->getFieldsetStart( 'config-admin-box' ) . $this->parent->getTextBox( [ diff --git a/mw-config/config.js b/mw-config/config.js index bb62067e2e..99290f4453 100644 --- a/mw-config/config.js +++ b/mw-config/config.js @@ -73,7 +73,9 @@ // Hide "other" textboxes by default // Should not be done in CSS for javascript disabled compatibility - $( '.enabledByOther' ).closest( '.config-block' ).hide(); + if ( !$( '#config__NamespaceType_other' ).is( ':checked' ) ) { + $( '.enabledByOther' ).closest( '.config-block' ).hide(); + } // Enable/disable "other" textboxes $( '.enableForOther' ).click( function () {