Index: trunk/extensions/SemanticForms/includes/SF_FormInputs.php |
— | — | @@ -93,6 +93,7 @@ |
94 | 94 | // set size based on pre-set size, or field type - if field type is set, |
95 | 95 | // possibly add validation too |
96 | 96 | $size = 35; |
| 97 | + $inputType = ''; |
97 | 98 | if ( array_key_exists( 'field_type', $other_args ) ) { |
98 | 99 | if ( $other_args['field_type'] == 'number' ) { |
99 | 100 | $size = 10; |
— | — | @@ -144,7 +145,9 @@ |
145 | 146 | $text .= self::uploadLinkHTML( $input_id, $delimiter, $default_filename ); |
146 | 147 | } |
147 | 148 | $spanClass = "inputSpan"; |
148 | | - $spanClass .= " {$inputType}Input"; |
| 149 | + if ( $inputType != '' ) { |
| 150 | + $spanClass .= " {$inputType}Input"; |
| 151 | + } |
149 | 152 | if ( $is_mandatory ) { $spanClass .= " mandatoryFieldSpan"; } |
150 | 153 | $text = Xml::tags( 'span', array( 'class' => $spanClass ), $text ); |
151 | 154 | return $text; |
— | — | @@ -260,10 +263,7 @@ |
261 | 264 | $selectAttrs['disabled'] = 'disabled'; |
262 | 265 | } |
263 | 266 | $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"; |
268 | 268 | if ( $is_mandatory ) { |
269 | 269 | $text = Xml::tags( 'span', array( 'class' => 'inputSpan mandatoryFieldSpan' ), $text ); |
270 | 270 | } |
— | — | @@ -352,7 +352,7 @@ |
353 | 353 | } |
354 | 354 | } |
355 | 355 | |
356 | | - $text .= "\t" . Xml::hidden( $input_name . '[is_list]', array( 'value' => 1 ) ) . "\n"; |
| 356 | + $text .= "\t" . Xml::hidden( $input_name . '[is_list]', 1 ) . "\n"; |
357 | 357 | $outerSpanAttrs = array( 'id' => $outerSpanID, 'class' => $outerSpanClass ); |
358 | 358 | $text = "\t" . Xml::tags( 'span', $outerSpanAttrs, $text ) . "\n"; |
359 | 359 | |
— | — | @@ -1057,7 +1057,7 @@ |
1058 | 1058 | } |
1059 | 1059 | $text = '<div style="overflow: auto; padding: 5px; border: 1px #aaaaaa solid; max-height: ' . $height . 'px; width: ' . $width . 'px;">' . $tree . '</div>'; |
1060 | 1060 | |
1061 | | - $text .= "\t" . Xml::hidden( $input_name . '[is_list]', array( 'value' => 1 ) ) . "\n"; |
| 1061 | + $text .= "\t" . Xml::hidden( $input_name . '[is_list]', 1 ) . "\n"; |
1062 | 1062 | $spanClass = "checkboxesSpan"; |
1063 | 1063 | if ( $is_mandatory) { $spanClass .= " mandatoryFieldSpan"; } |
1064 | 1064 | $text = "\t" . Xml::tags( 'span', array( 'class' => $spanClass ), $text ) . "\n"; |