follop-up to 68230: forgot to commit the styles needed for layout grids
[lhc/web/wiklou.git] / includes / Xml.php
index a20c6ca..f7ddb4c 100644 (file)
@@ -147,7 +147,7 @@ class Xml {
                        . "\n"
                        . Xml::closeElement( 'select' );
                if ( !is_null( $label ) ) {
-                       $ret = Xml::label( $label, $element_name ) . ' ' . $ret;
+                       $ret = Xml::label( $label, $element_name ) . ' ' . $ret;
                }
                return $ret;
        }
@@ -275,17 +275,16 @@ class Xml {
         * @return string HTML
         */
        public static function input( $name, $size=false, $value=false, $attribs=array() ) {
-               $attributes = array();
+               $attributes = array( 'name' => $name );
+
                if( $size ) {
                        $attributes['size'] = $size;
                }
 
-               if( $value ) {
+               if( $value !== false ) { // maybe 0
                        $attributes['value'] = $value;
                }
 
-               $attributes['name'] = $name;
-
                return self::element( 'input', $attributes + $attribs );
        }
 
@@ -368,7 +367,7 @@ class Xml {
         */
        public static function inputLabel( $label, $name, $id, $size=false, $value=false, $attribs=array() ) {
                list( $label, $input ) = self::inputLabelSep( $label, $name, $id, $size, $value, $attribs );
-               return $label . ' ' . $input;
+               return $label . ' ' . $input;
        }
 
        /**
@@ -387,7 +386,7 @@ class Xml {
         */
        public static function checkLabel( $label, $name, $id, $checked=false, $attribs=array() ) {
                return self::check( $name, $checked, array( 'id' => $id ) + $attribs ) .
-                       ' ' .
+                       ' ' .
                        self::label( $label, $id, $attribs );
        }
 
@@ -397,7 +396,7 @@ class Xml {
         */
        public static function radioLabel( $label, $name, $value, $id, $checked=false, $attribs=array() ) {
                return self::radio( $name, $value, $checked, array( 'id' => $id ) + $attribs ) .
-                       ' ' .
+                       ' ' .
                        self::label( $label, $id, $attribs );
        }