Index: trunk/phase3/includes/HTMLForm.php |
— | — | @@ -572,22 +572,32 @@ |
573 | 573 | $attribs[$param] = ''; |
574 | 574 | } |
575 | 575 | } |
576 | | - if ( isset( $this->mParams['type'] ) ) { |
| 576 | + } |
| 577 | + |
| 578 | + # Implement tiny differences between some field variants |
| 579 | + # here, rather than creating a new class for each one which |
| 580 | + # is essentially just a clone of this one. |
| 581 | + if ( isset( $this->mParams['type'] ) ) { |
| 582 | + # Options that apply only to HTML5 |
| 583 | + if( $wgHtml5 ){ |
577 | 584 | switch ( $this->mParams['type'] ) { |
578 | | - case 'email': |
579 | | - $attribs['type'] = 'email'; |
580 | | - break; |
581 | | - case 'int': |
582 | | - $attribs['type'] = 'number'; |
583 | | - break; |
584 | | - case 'float': |
585 | | - $attribs['type'] = 'number'; |
586 | | - $attribs['step'] = 'any'; |
587 | | - break; |
| 585 | + case 'email': |
| 586 | + $attribs['type'] = 'email'; |
| 587 | + break; |
| 588 | + case 'int': |
| 589 | + $attribs['type'] = 'number'; |
| 590 | + break; |
| 591 | + case 'float': |
| 592 | + $attribs['type'] = 'number'; |
| 593 | + $attribs['step'] = 'any'; |
| 594 | + break; |
| 595 | + } |
| 596 | + } |
| 597 | + # Options that apply to HTML4 as well |
| 598 | + switch( $this->mParams['type'] ){ |
588 | 599 | case 'password': |
589 | 600 | $attribs['type'] = 'password'; |
590 | 601 | break; |
591 | | - } |
592 | 602 | } |
593 | 603 | } |
594 | 604 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -538,6 +538,8 @@ |
539 | 539 | * (bug 3421) Live preview no longer breaks user CSS/JS previews |
540 | 540 | * (bug 11264) The file logo on a file description page for documents (PDF, ...) |
541 | 541 | now links to the file rather than the file description page |
| 542 | +* Password fields built with HTMLForm now still have the type="password" attribute |
| 543 | + if $wgHtml5=false. |
542 | 544 | |
543 | 545 | == API changes in 1.16 == |
544 | 546 | |