dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71b7c21
)
OOUIHTMLForm: Make setting 'readonly' on a text field actually work
author
Kunal Mehta
<legoktm@gmail.com>
Tue, 30 Jun 2015 20:03:58 +0000
(13:03 -0700)
committer
Kunal Mehta
<legoktm@gmail.com>
Tue, 30 Jun 2015 20:03:58 +0000
(13:03 -0700)
Previously 'readOnly' was set to an empty string, which casts to boolean
false.
Change-Id: I7d1e7f02731c7235da2ae1e0a5e3d0be2b44d978
includes/htmlform/HTMLTextField.php
patch
|
blob
|
history
diff --git
a/includes/htmlform/HTMLTextField.php
b/includes/htmlform/HTMLTextField.php
index
9c5b868
..
5c04ee2
100644
(file)
--- a/
includes/htmlform/HTMLTextField.php
+++ b/
includes/htmlform/HTMLTextField.php
@@
-113,6
+113,11
@@
class HTMLTextField extends HTMLFormField {
'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(