r78135 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78134‎ | r78135 | r78136 >
Date:20:07, 9 December 2010
Author:yaron
Status:deferred
Tags:
Comment:
Bug fixes
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormInputs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormInputs.php
@@ -93,6 +93,7 @@
9494 // set size based on pre-set size, or field type - if field type is set,
9595 // possibly add validation too
9696 $size = 35;
 97+ $inputType = '';
9798 if ( array_key_exists( 'field_type', $other_args ) ) {
9899 if ( $other_args['field_type'] == 'number' ) {
99100 $size = 10;
@@ -144,7 +145,9 @@
145146 $text .= self::uploadLinkHTML( $input_id, $delimiter, $default_filename );
146147 }
147148 $spanClass = "inputSpan";
148 - $spanClass .= " {$inputType}Input";
 149+ if ( $inputType != '' ) {
 150+ $spanClass .= " {$inputType}Input";
 151+ }
149152 if ( $is_mandatory ) { $spanClass .= " mandatoryFieldSpan"; }
150153 $text = Xml::tags( 'span', array( 'class' => $spanClass ), $text );
151154 return $text;
@@ -260,10 +263,7 @@
261264 $selectAttrs['disabled'] = 'disabled';
262265 }
263266 $text = Xml::tags( 'select', $selectAttrs, $optionsText );
264 - $hiddenInputAttrs = array(
265 - 'value' => 1,
266 - );
267 - $text .= "\t" . Xml::hidden( $input_name . '[is_list]', $hiddenInputAttrs ) . "\n";
 267+ $text .= "\t" . Xml::hidden( $input_name . '[is_list]', 1 ) . "\n";
268268 if ( $is_mandatory ) {
269269 $text = Xml::tags( 'span', array( 'class' => 'inputSpan mandatoryFieldSpan' ), $text );
270270 }
@@ -352,7 +352,7 @@
353353 }
354354 }
355355
356 - $text .= "\t" . Xml::hidden( $input_name . '[is_list]', array( 'value' => 1 ) ) . "\n";
 356+ $text .= "\t" . Xml::hidden( $input_name . '[is_list]', 1 ) . "\n";
357357 $outerSpanAttrs = array( 'id' => $outerSpanID, 'class' => $outerSpanClass );
358358 $text = "\t" . Xml::tags( 'span', $outerSpanAttrs, $text ) . "\n";
359359
@@ -1057,7 +1057,7 @@
10581058 }
10591059 $text = '<div style="overflow: auto; padding: 5px; border: 1px #aaaaaa solid; max-height: ' . $height . 'px; width: ' . $width . 'px;">' . $tree . '</div>';
10601060
1061 - $text .= "\t" . Xml::hidden( $input_name . '[is_list]', array( 'value' => 1 ) ) . "\n";
 1061+ $text .= "\t" . Xml::hidden( $input_name . '[is_list]', 1 ) . "\n";
10621062 $spanClass = "checkboxesSpan";
10631063 if ( $is_mandatory) { $spanClass .= " mandatoryFieldSpan"; }
10641064 $text = "\t" . Xml::tags( 'span', array( 'class' => $spanClass ), $text ) . "\n";

Follow-up revisions

RevisionCommit summaryAuthorDate
r78146Syncing from r78135 thru r78145 of trunkawjrichards21:48, 9 December 2010

Status & tagging log