http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99691

Revision: 99691
Author:   yaron
Date:     2011-10-13 16:34:40 +0000 (Thu, 13 Oct 2011)
Log Message:
-----------
Bug fix for displaying input type

Modified Paths:
--------------
    trunk/extensions/SemanticForms/includes/SF_FormField.php

Modified: trunk/extensions/SemanticForms/includes/SF_FormField.php
===================================================================
--- trunk/extensions/SemanticForms/includes/SF_FormField.php    2011-10-13 
16:32:11 UTC (rev 99690)
+++ trunk/extensions/SemanticForms/includes/SF_FormField.php    2011-10-13 
16:34:40 UTC (rev 99691)
@@ -225,9 +225,9 @@
                }
                $text .= $this->inputTypeDropdownHTML( $field_form_text, 
$default_input_type, $possible_input_types, $template_field->getInputType() );
 
-               if (! is_null( $template_field->getInputType() ) ) {
+               if ( !is_null( $template_field->getInputType() ) ) {
                        $cur_input_type = $template_field->getInputType();
-               } elseif (! is_null( $default_input_type ) ) {
+               } elseif ( !is_null( $default_input_type ) ) {
                        $cur_input_type = $default_input_type;
                } else {
                        $cur_input_type = $possible_input_types[0];
@@ -272,8 +272,12 @@
                }
                if ( ! $part_of_multiple ) { $text .= "| "; }
                $text .= "{{{field|" . $this->template_field->getFieldName();
+               // TODO - why is there an input type field in both the form 
field and the template
+               // field? One of them should probably be removed.
                if ( $this->mIsHidden ) {
                        $text .= "|hidden";
+               } elseif ( !is_null( $this->getInputType() ) ) {
+                       $text .= "|input type=" . $this->getInputType();
                } elseif ( $this->template_field->getInputType() != '' ) {
                        $text .= "|input type=" . 
$this->template_field->getInputType();
                }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to