r88459 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88458‎ | r88459 | r88460 >
Date:15:53, 20 May 2011
Author:yaron
Status:deferred
Tags:
Comment:
Changed textareas to have a default width of 100%, instead of 80 characters, if no width is specified
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormInputs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormInputs.php
@@ -316,11 +316,6 @@
317317 } else {
318318 $rows = 5;
319319 }
320 - if ( array_key_exists( 'cols', $other_args ) ) {
321 - $cols = $other_args['cols'];
322 - } else {
323 - $cols = 80;
324 - }
325320
326321 if ( array_key_exists( 'autogrow', $other_args ) ) {
327322 $className .= ' autoGrow';
@@ -331,9 +326,15 @@
332327 'id' => $input_id,
333328 'name' => $input_name,
334329 'rows' => $rows,
335 - 'cols' => $cols,
336330 'class' => $className,
337331 );
 332+
 333+ if ( array_key_exists( 'cols', $other_args ) ) {
 334+ $textarea_attrs['cols'] = $other_args['cols'];
 335+ } else {
 336+ $textarea_attrs['style'] = "width: 100%";
 337+ }
 338+
338339 if ( $is_disabled ) {
339340 $textarea_attrs['disabled'] = 'disabled';
340341 }