Index: trunk/phase3/includes/HTMLForm.php |
— | — | @@ -852,11 +852,14 @@ |
853 | 853 | $attribs[$param] = ''; |
854 | 854 | } |
855 | 855 | } |
| 856 | + } |
856 | 857 | |
857 | | - # Implement tiny differences between some field variants |
858 | | - # here, rather than creating a new class for each one which |
859 | | - # is essentially just a clone of this one. |
860 | | - if ( isset( $this->mParams['type'] ) ) { |
| 858 | + # Implement tiny differences between some field variants |
| 859 | + # here, rather than creating a new class for each one which |
| 860 | + # is essentially just a clone of this one. |
| 861 | + if ( isset( $this->mParams['type'] ) ) { |
| 862 | + # Options that apply only to HTML5 |
| 863 | + if( $wgHtml5 ){ |
861 | 864 | switch ( $this->mParams['type'] ) { |
862 | 865 | case 'email': |
863 | 866 | $attribs['type'] = 'email'; |
— | — | @@ -868,11 +871,14 @@ |
869 | 872 | $attribs['type'] = 'number'; |
870 | 873 | $attribs['step'] = 'any'; |
871 | 874 | break; |
872 | | - case 'password': |
873 | | - $attribs['type'] = 'password'; |
874 | | - break; |
875 | 875 | } |
876 | 876 | } |
| 877 | + # Options that apply to HTML4 as well |
| 878 | + switch( $this->mParams['type'] ){ |
| 879 | + case 'password': |
| 880 | + $attribs['type'] = 'password'; |
| 881 | + break; |
| 882 | + } |
877 | 883 | } |
878 | 884 | |
879 | 885 | return Html::element( 'input', $attribs ); |