Index: trunk/phase3/includes/HTMLForm.php |
— | — | @@ -1174,6 +1174,10 @@ |
1175 | 1175 | 'value' => $value, |
1176 | 1176 | ) + $this->getTooltipAndAccessKey(); |
1177 | 1177 | |
| 1178 | + if ( $this->mClass !== '' ) { |
| 1179 | + $attribs['class'] = $this->mClass; |
| 1180 | + } |
| 1181 | + |
1178 | 1182 | if ( isset( $this->mParams['maxlength'] ) ) { |
1179 | 1183 | $attribs['maxlength'] = $this->mParams['maxlength']; |
1180 | 1184 | } |
— | — | @@ -1244,7 +1248,10 @@ |
1245 | 1249 | 'rows' => $this->getRows(), |
1246 | 1250 | ) + $this->getTooltipAndAccessKey(); |
1247 | 1251 | |
1248 | | - |
| 1252 | + if ( $this->mClass !== '' ) { |
| 1253 | + $attribs['class'] = $this->mClass; |
| 1254 | + } |
| 1255 | + |
1249 | 1256 | if ( !empty( $this->mParams['disabled'] ) ) { |
1250 | 1257 | $attribs['disabled'] = 'disabled'; |
1251 | 1258 | } |
— | — | @@ -1351,6 +1358,10 @@ |
1352 | 1359 | if ( !empty( $this->mParams['disabled'] ) ) { |
1353 | 1360 | $attr['disabled'] = 'disabled'; |
1354 | 1361 | } |
| 1362 | + |
| 1363 | + if ( $this->mClass !== '' ) { |
| 1364 | + $attr['class'] = $this->mClass; |
| 1365 | + } |
1355 | 1366 | |
1356 | 1367 | return Xml::check( $this->mName, $value, $attr ) . ' ' . |
1357 | 1368 | Html::rawElement( 'label', array( 'for' => $this->mID ), $this->mLabel ); |
— | — | @@ -1428,6 +1439,10 @@ |
1429 | 1440 | if ( !empty( $this->mParams['disabled'] ) ) { |
1430 | 1441 | $select->setAttribute( 'disabled', 'disabled' ); |
1431 | 1442 | } |
| 1443 | + |
| 1444 | + if ( $this->mClass !== '' ) { |
| 1445 | + $select->setAttribute( 'class', $this->mClass ); |
| 1446 | + } |
1432 | 1447 | |
1433 | 1448 | $select->addOptions( $this->mParams['options'] ); |
1434 | 1449 | |
— | — | @@ -1489,6 +1504,10 @@ |
1490 | 1505 | if ( isset( $this->mParams['maxlength'] ) ) { |
1491 | 1506 | $tbAttribs['maxlength'] = $this->mParams['maxlength']; |
1492 | 1507 | } |
| 1508 | + |
| 1509 | + if ( $this->mClass !== '' ) { |
| 1510 | + $tbAttribs['class'] = $this->mClass; |
| 1511 | + } |
1493 | 1512 | |
1494 | 1513 | $textbox = Html::input( |
1495 | 1514 | $this->mName . '-other', |
— | — | @@ -1712,6 +1731,10 @@ |
1713 | 1732 | 'id' => $this->mID . '-other', |
1714 | 1733 | 'size' => $this->getSize(), |
1715 | 1734 | ); |
| 1735 | + |
| 1736 | + if ( $this->mClass !== '' ) { |
| 1737 | + $textAttribs['class'] = $this->mClass; |
| 1738 | + } |
1716 | 1739 | |
1717 | 1740 | foreach ( array( 'required', 'autofocus', 'multiple', 'disabled' ) as $param ) { |
1718 | 1741 | if ( isset( $this->mParams[$param] ) ) { |
— | — | @@ -1941,7 +1964,7 @@ |
1942 | 1965 | return Xml::submitButton( |
1943 | 1966 | $value, |
1944 | 1967 | array( |
1945 | | - 'class' => 'mw-htmlform-submit', |
| 1968 | + 'class' => 'mw-htmlform-submit ' . $this->mClass, |
1946 | 1969 | 'name' => $this->mName, |
1947 | 1970 | 'id' => $this->mID, |
1948 | 1971 | ) |