Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/221973
Change subject: OOUIHTMLForm: Make setting 'readonly' on a text field actually
work
......................................................................
OOUIHTMLForm: Make setting 'readonly' on a text field actually work
Previously 'readOnly' was set to an empty string, which casts to boolean
false.
Change-Id: I7d1e7f02731c7235da2ae1e0a5e3d0be2b44d978
---
M includes/htmlform/HTMLTextField.php
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/73/221973/1
diff --git a/includes/htmlform/HTMLTextField.php
b/includes/htmlform/HTMLTextField.php
index 9c5b868..5c04ee2 100644
--- a/includes/htmlform/HTMLTextField.php
+++ b/includes/htmlform/HTMLTextField.php
@@ -113,6 +113,11 @@
'tabindex' => 'tabIndex',
) );
+ if ( isset( $attribs['readOnly'] ) ) {
+ // This needs to be set to a boolean value
+ $attribs['readOnly'] = true;
+ }
+
$type = $this->getType( $attribs );
return new OOUI\TextInputWidget( array(
--
To view, visit https://gerrit.wikimedia.org/r/221973
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d1e7f02731c7235da2ae1e0a5e3d0be2b44d978
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits