Index: trunk/phase3/includes/SpecialPreferences.php |
— | — | @@ -474,7 +474,7 @@ |
475 | 475 | } |
476 | 476 | |
477 | 477 | function addRow($td1, $td2) { |
478 | | - return "<tr><td align='right'>$td1</td><td align='left'>$td2</td></tr>"; |
| 478 | + return "<tr><td class='mw-label'>$td1</td><td class='mw-input'>$td2</td></tr>"; |
479 | 479 | } |
480 | 480 | |
481 | 481 | /** |
— | — | @@ -870,40 +870,63 @@ |
871 | 871 | # Date/Time |
872 | 872 | # |
873 | 873 | |
874 | | - $wgOut->addHTML( "<fieldset>\n<legend>" . wfMsg( 'datetime' ) . "</legend>\n" ); |
| 874 | + $wgOut->addHTML( |
| 875 | + Xml::openElement( 'fieldset' ) . |
| 876 | + Xml::element( 'legend', null, wfMsg( 'datetime' ) ) . "\n" |
| 877 | + ); |
875 | 878 | |
876 | 879 | if ($dateopts) { |
877 | | - $wgOut->addHTML( "<fieldset>\n<legend>" . wfMsg( 'dateformat' ) . "</legend>\n" ); |
| 880 | + $wgOut->addHTML( |
| 881 | + Xml::openElement( 'fieldset' ) . |
| 882 | + Xml::element( 'legend', null, wfMsg( 'dateformat' ) ) . "\n" |
| 883 | + ); |
878 | 884 | $idCnt = 0; |
879 | 885 | $epoch = '20010115161234'; # Wikipedia day |
880 | 886 | foreach( $dateopts as $key ) { |
881 | 887 | if( $key == 'default' ) { |
882 | | - $formatted = wfMsgHtml( 'datedefault' ); |
| 888 | + $formatted = wfMsg( 'datedefault' ); |
883 | 889 | } else { |
884 | | - $formatted = htmlspecialchars( $wgLang->timeanddate( $epoch, false, $key ) ); |
| 890 | + $formatted = $wgLang->timeanddate( $epoch, false, $key ); |
885 | 891 | } |
886 | | - ($key == $this->mDate) ? $checked = ' checked="checked"' : $checked = ''; |
887 | | - $wgOut->addHTML( "<div><input type='radio' name=\"wpDate\" id=\"wpDate$idCnt\" ". |
888 | | - "value=\"$key\"$checked /> <label for=\"wpDate$idCnt\">$formatted</label></div>\n" ); |
| 892 | + $checked = ( $key == $this->mDate ) ? true : false; |
| 893 | + $wgOut->addHTML( |
| 894 | + Xml::tags( 'div', null, |
| 895 | + Xml::radioLabel( $formatted, 'wpDate', $key, "wpDate$idCnt", $checked ) |
| 896 | + ) . "\n" |
| 897 | + ); |
889 | 898 | $idCnt++; |
890 | 899 | } |
891 | | - $wgOut->addHTML( "</fieldset>\n" ); |
| 900 | + $wgOut->addHTML( Xml::closeElement( 'fieldset' ) . "\n" ); |
892 | 901 | } |
893 | 902 | |
894 | 903 | $nowlocal = $wgLang->time( $now = wfTimestampNow(), true ); |
895 | 904 | $nowserver = $wgLang->time( $now, false ); |
896 | 905 | |
897 | | - $wgOut->addHTML( '<fieldset><legend>' . wfMsg( 'timezonelegend' ). '</legend><table>' . |
| 906 | + $wgOut->addHTML( |
| 907 | + Xml::openElement( 'fieldset' ) . |
| 908 | + Xml::element( 'legend', null, wfMsg( 'timezonelegend' ) ) . |
| 909 | + Xml::openElement( 'table' ) . |
898 | 910 | $this->addRow( wfMsg( 'servertime' ), $nowserver ) . |
899 | 911 | $this->addRow( wfMsg( 'localtime' ), $nowlocal ) . |
900 | 912 | $this->addRow( |
901 | | - '<label for="wpHourDiff">' . wfMsg( 'timezoneoffset' ) . '</label>', |
902 | | - "<input type='text' name='wpHourDiff' id='wpHourDiff' value=\"" . htmlspecialchars( $this->mHourDiff ) . "\" size='6' />" |
903 | | - ) . "<tr><td colspan='2'> |
904 | | - <input type='button' value=\"" . wfMsg( 'guesstimezone' ) ."\" |
905 | | - onclick='javascript:guessTimezone()' id='guesstimezonebutton' style='display:none;' /> |
906 | | - </td></tr></table><div class='prefsectiontip'>¹" . wfMsg( 'timezonetext' ) . "</div></fieldset> |
907 | | - </fieldset>\n\n" ); |
| 913 | + Xml::label( wfMsg( 'timezoneoffset' ), 'wpHourDiff' ), |
| 914 | + Xml::input( 'wpHourDiff', 6, $this->mHourDiff, array( 'class' => 'wpHourDiff' ) ) ) . |
| 915 | + "<tr> |
| 916 | + <td></td> |
| 917 | + <td class='mw-submit'>" . |
| 918 | + Xml::element( 'input', |
| 919 | + array( 'type' => 'button', |
| 920 | + 'value' => wfMsg( 'guesstimezone' ), |
| 921 | + 'onclick' => 'javascript:guessTimezone()', |
| 922 | + 'id' => 'guesstimezonebutton', |
| 923 | + 'style' => 'display:none;' ) ) . |
| 924 | + "</td> |
| 925 | + </tr>" . |
| 926 | + Xml::closeElement( 'table' ) . |
| 927 | + Xml::element( 'div', array( 'class' => 'prefsectiontip' ), wfMsg( 'timezonetext' ) ). |
| 928 | + Xml::closeElement( 'fieldset' ) . |
| 929 | + Xml::closeElement( 'fieldset' ) . "\n\n" |
| 930 | + ); |
908 | 931 | |
909 | 932 | # Editing |
910 | 933 | # |
— | — | @@ -980,30 +1003,39 @@ |
981 | 1004 | # Search |
982 | 1005 | $ajaxsearch = $wgAjaxSearch ? |
983 | 1006 | $this->addRow( |
984 | | - wfLabel( wfMsg( 'useajaxsearch' ), 'wpUseAjaxSearch' ), |
985 | | - wfCheck( 'wpUseAjaxSearch', $this->mUseAjaxSearch, array( 'id' => 'wpUseAjaxSearch' ) ) |
| 1007 | + Xml::label( wfMsg( 'useajaxsearch' ), 'wpUseAjaxSearch' ), |
| 1008 | + Xml::check( 'wpUseAjaxSearch', $this->mUseAjaxSearch, array( 'id' => 'wpUseAjaxSearch' ) ) |
986 | 1009 | ) : ''; |
987 | 1010 | $mwsuggest = $wgEnableMWSuggest ? |
988 | 1011 | $this->addRow( |
989 | | - wfLabel( wfMsg( 'mwsuggest-disable' ), 'wpDisableMWSuggest' ), |
990 | | - wfCheck( 'wpDisableMWSuggest', $this->mDisableMWSuggest, array( 'id' => 'wpDisableMWSuggest' ) ) |
| 1012 | + Xml::label( wfMsg( 'mwsuggest-disable' ), 'wpDisableMWSuggest' ), |
| 1013 | + Xml::check( 'wpDisableMWSuggest', $this->mDisableMWSuggest, array( 'id' => 'wpDisableMWSuggest' ) ) |
991 | 1014 | ) : ''; |
992 | | - $wgOut->addHTML( '<fieldset><legend>' . wfMsg( 'searchresultshead' ) . '</legend><table>' . |
993 | | - $ajaxsearch . |
| 1015 | + $wgOut->addHTML( |
| 1016 | + Xml::openElement( 'fieldset' ) . |
| 1017 | + Xml::element( 'legend', null, wfMsg( 'searchresultshead' ) ) . |
| 1018 | + Xml::openElement( 'table' ) . |
| 1019 | + $ajaxsearch . |
994 | 1020 | $this->addRow( |
995 | | - wfLabel( wfMsg( 'resultsperpage' ), 'wpSearch' ), |
996 | | - wfInput( 'wpSearch', 4, $this->mSearch, array( 'id' => 'wpSearch' ) ) |
| 1021 | + Xml::label( wfMsg( 'resultsperpage' ), 'wpSearch' ), |
| 1022 | + Xml::input( 'wpSearch', 4, $this->mSearch, array( 'id' => 'wpSearch' ) ) |
997 | 1023 | ) . |
998 | 1024 | $this->addRow( |
999 | | - wfLabel( wfMsg( 'contextlines' ), 'wpSearchLines' ), |
1000 | | - wfInput( 'wpSearchLines', 4, $this->mSearchLines, array( 'id' => 'wpSearchLines' ) ) |
| 1025 | + Xml::label( wfMsg( 'contextlines' ), 'wpSearchLines' ), |
| 1026 | + Xml::input( 'wpSearchLines', 4, $this->mSearchLines, array( 'id' => 'wpSearchLines' ) ) |
1001 | 1027 | ) . |
1002 | 1028 | $this->addRow( |
1003 | | - wfLabel( wfMsg( 'contextchars' ), 'wpSearchChars' ), |
1004 | | - wfInput( 'wpSearchChars', 4, $this->mSearchChars, array( 'id' => 'wpSearchChars' ) ) |
| 1029 | + Xml::label( wfMsg( 'contextchars' ), 'wpSearchChars' ), |
| 1030 | + Xml::input( 'wpSearchChars', 4, $this->mSearchChars, array( 'id' => 'wpSearchChars' ) ) |
1005 | 1031 | ) . |
1006 | | - $mwsuggest. |
1007 | | - "</table><fieldset><legend>" . wfMsg( 'defaultns' ) . "</legend>$ps</fieldset></fieldset>" ); |
| 1032 | + $mwsuggest . |
| 1033 | + Xml::closeElement( 'table' ) . |
| 1034 | + Xml::openElement( 'fieldset' ) . |
| 1035 | + Xml::element( 'legend', null, wfMsg( 'defaultns' ) ) . |
| 1036 | + $ps . |
| 1037 | + Xml::closeElement( 'fieldset' ) . |
| 1038 | + Xml::closeElement( 'fieldset' ) |
| 1039 | + ); |
1008 | 1040 | |
1009 | 1041 | # Misc |
1010 | 1042 | # |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1389,7 +1389,7 @@ |
1390 | 1390 | 'recentchangescount' => 'Number of edits to show in recent changes:', |
1391 | 1391 | 'savedprefs' => 'Your preferences have been saved.', |
1392 | 1392 | 'timezonelegend' => 'Time zone', |
1393 | | -'timezonetext' => 'The number of hours your local time differs from server time (UTC).', |
| 1393 | +'timezonetext' => '¹The number of hours your local time differs from server time (UTC).', |
1394 | 1394 | 'localtime' => 'Local time', |
1395 | 1395 | 'timezoneoffset' => 'Offset¹', |
1396 | 1396 | 'servertime' => 'Server time', |
Index: trunk/phase3/languages/messages/MessagesDe.php |
— | — | @@ -1021,7 +1021,7 @@ |
1022 | 1022 | 'recentchangescount' => 'Anzahl der Einträge in „Letzte Änderungen“:', |
1023 | 1023 | 'savedprefs' => 'Deine Einstellungen wurden gespeichert.', |
1024 | 1024 | 'timezonelegend' => 'Zeitzone', |
1025 | | -'timezonetext' => 'Gib die Anzahl der Stunden ein, die zwischen deiner Zeitzone und UTC liegen.', |
| 1025 | +'timezonetext' => '¹Gib die Anzahl der Stunden ein, die zwischen deiner Zeitzone und UTC liegen.', |
1026 | 1026 | 'localtime' => 'Ortszeit:', |
1027 | 1027 | 'timezoneoffset' => 'Unterschied¹:', |
1028 | 1028 | 'servertime' => 'Aktuelle Zeit auf dem Server:', |