r88249 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88248‎ | r88249 | r88250 >
Date:17:39, 16 May 2011
Author:kipcool
Status:deferred
Tags:
Comment:
Using disabled="disabled" for textarea that should not be edited.
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/forms.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/forms.php
@@ -13,7 +13,8 @@
1414
1515 function getTextArea( $name, $text = "", $rows = 5, $columns = 80, $disabled = false ) {
1616 if ( $disabled ) {
17 - return '<textarea name="' . $name . '" rows="' . $rows . '" cols="' . $columns . '" READONLY>' . htmlspecialchars( $text ) . '</textarea>';
 17+ // READONLY alone is not enough: apparently, some browsers ignore it
 18+ return '<textarea disabled="disabled" name="' . $name . '" rows="' . $rows . '" cols="' . $columns . '" READONLY>' . htmlspecialchars( $text ) . '</textarea>';
1819 } else {
1920 return '<textarea name="' . $name . '" rows="' . $rows . '" cols="' . $columns . '">' . htmlspecialchars( $text ) . '</textarea>';
2021 }

Status & tagging log