From 29a57e5d25eec1db546fc5b0f22ea2f1f9f717e3 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Wed, 19 May 2004 20:54:00 +0000 Subject: [PATCH] mainly back to simple fieldset version, cards deactivated in favour of js toc for now --- includes/SpecialPreferences.php | 141 ++++++++++++++++++-------------- 1 file changed, 78 insertions(+), 63 deletions(-) diff --git a/includes/SpecialPreferences.php b/includes/SpecialPreferences.php index 775a74584a..7bdcf8d6f9 100644 --- a/includes/SpecialPreferences.php +++ b/includes/SpecialPreferences.php @@ -1,7 +1,4 @@ \n"; } - /* private */ function mainPrefsForm( $err ) { global $wgUser, $wgOut, $wgLang, $wgUseDynamicDates, $wgValidSkinNames; - - $skin = $wgUser->getSkin(); - $cardset = $skin->newCardSet( wfMsg( "preferences" ) ); $wgOut->setPageTitle( wfMsg( "preferences" ) ); $wgOut->setArticleRelated( false ); @@ -294,12 +287,17 @@ class PreferencesForm { $titleObj = Title::makeTitle( NS_SPECIAL, "Preferences" ); $action = $titleObj->escapeLocalURL(); + $qb = wfMsg( "qbsettings" ); $cp = wfMsg( "changepassword" ); + $sk = wfMsg( "skin" ); + $math = wfMsg( "math" ); + $dateFormat = wfMsg("dateformat"); $opw = wfMsg( "oldpassword" ); $npw = wfMsg( "newpassword" ); $rpw = wfMsg( "retypenew" ); $svp = wfMsg( "saveprefs" ); $rsp = wfMsg( "resetprefs" ); + $tbs = wfMsg( "textboxsize" ); $tbr = wfMsg( "rows" ); $tbc = wfMsg( "columns" ); $ltz = wfMsg( "localtime" ); @@ -312,15 +310,16 @@ class PreferencesForm { $emf = wfMsg( "emailflag" ); $ynn = wfMsg( "yournick" ); $stt = wfMsg ( "stubthreshold" ) ; + $srh = wfMsg( "searchresultshead" ); $rpp = wfMsg( "resultsperpage" ); $scl = wfMsg( "contextlines" ); $scc = wfMsg( "contextchars" ); $rcc = wfMsg( "recentchangescount" ); + $dsn = wfMsg( "defaultns" ); $wgOut->addHTML( "
" ); - ###################################################################### # First section: identity # Email, etc. # @@ -330,127 +329,142 @@ class PreferencesForm { if ( $this->mEmailFlag ) { $emfc = 'checked="checked"'; } else { $emfc = ""; } + $ps = $this->namespacesCheckboxes(); + + $wgOut->addHTML( "
+ ".wfMsg('prefs-personal')." +
+
+
+
\n" ); + # Fields for changing password # $this->mOldpass = wfEscapeHTML( $this->mOldpass ); $this->mNewpass = wfEscapeHTML( $this->mNewpass ); $this->mRetypePass = wfEscapeHTML( $this->mRetypePass ); - $cardset->addCard( "Idento", "
-
-
-
-
- $cp: + $wgOut->addHTML( "
+ $cp
" . $this->getToggle( "rememberpassword" ) . " -
"); +
\n
\n" ); - ###################################################################### # Quickbar setting # - $s=""; + $wgOut->addHtml( "
\n$qb\n" ); for ( $i = 0; $i < count( $qbs ); ++$i ) { if ( $i == $this->mQuickbar ) { $checked = ' checked="checked"'; } else { $checked = ""; } - $s .= "
\n"; + $wgOut->addHTML( "
\n" ); } - $cardset->addCard( wfMsg( "qbsettings" ), $s ); - + $wgOut->addHtml( "
\n\n" ); - ###################################################################### # Skin setting # + $wgOut->addHTML( "
\n$sk\n" ); # Only show members of $wgValidSkinNames rather than # $skinNames (skins is all skin names from Language.php) - $s=""; foreach ($wgValidSkinNames as $skinkey => $skinname ) { if ( $skinkey == $this->mSkin ) { $checked = ' checked="checked"'; } else { $checked = ""; } - $s .= "
\n"; + $wgOut->addHTML( "
\n" ); } - $cardset->addCard( wfMsg( "skin" ), $s ); + $wgOut->addHTML( "
\n\n" ); - ###################################################################### # Math setting # - $s=""; + $wgOut->addHTML( "
\n$math\n" ); for ( $i = 0; $i < count( $mathopts ); ++$i ) { if ( $i == $this->mMath ) { $checked = ' checked="checked"'; } else { $checked = ""; } - $s .= "
\n"; + $wgOut->addHTML( "
\n" ); } - $cardset->addCard( wfMsg( "math" ), $s ); + $wgOut->addHTML( "
\n\n" ); - ###################################################################### # Date format # if ( $wgUseDynamicDates ) { - $s=""; + $wgOut->addHTML( "
\n$dateFormat\n" ); for ( $i = 0; $i < count( $dateopts ); ++$i) { if ( $i == $this->mDate ) { $checked = ' checked="checked"'; } else { $checked = ""; } - $s .= "
\n" ; + $wgOut->addHTML( "
\n" ); } - $cardset->addCard( wfMsg("dateformat"), $s ); + $wgOut->addHTML( "
\n\n"); } - ###################################################################### # Textbox rows, cols # $nowlocal = $wgLang->time( $now = wfTimestampNow(), true ); $nowserver = $wgLang->time( $now, false ); - $cardset->addCard( wfMsg( "textboxsize" ), "
+ $wgOut->addHTML( "
+ $tbs\n +
-
" . - $this->getToggle( "editwidth" ) . - $this->getToggle( "showtoolbar" ) . - $this->getToggle( "previewontop" ) . - $this->getToggle( "watchdefault" ) . - $this->getToggle( "minordefault" ) ); - - $cardset->addCard( wfMsg( "dateformat" ), "
$tzServerTime: $nowserver
-
$ltz: $nowlocal
-
-
" ); - - $cardset->addCard( wfMsg( "recentchangescount" ), - "
- " . $this->getToggle( "hideminor" ) . - $this->getToggle( "usenewrc" ) . " -
" ); - - $cardset->addCard( wfMsg( "searchresultshead" ), " -
-
-
-
" . wfMsg( "defaultns" ) . "\n" . $this->namespacesCheckboxes() . "
" ); +
" . + $this->getToggle( "editwidth" ) . + $this->getToggle( "showtoolbar" ) . + $this->getToggle( "previewontop" ) . + $this->getToggle( "watchdefault" ) . + $this->getToggle( "minordefault" ) . " + + +
+ $dateFormat +
$tzServerTime: $nowserver
+
$ltz: $nowlocal
+
+
+
\n\n" ); + $wgOut->addHTML( " +
".wfMsg('prefs-rc')." +
+ " . $this->getToggle( "hideminor" ) . + $this->getToggle( "usenewrc" ) . " +
+
+ +
+ $srh +
+
+
+ +
+ $dsn + $ps +
+
+ " ); - ###################################################################### # Various checkbox options # - $s=""; + $wgOut->addHTML("
".wfMsg('prefs-misc').""); foreach ( $togs as $tname => $ttext ) { if( !array_key_exists( $tname, $this->mUsedToggles ) ) { - $s .= $this->getToggle( $tname ) ; + $wgOut->addHTML( $this->getToggle( $tname ) ); } } - $cardset->addCard( wfMsg("misc"), $s ); - - $cardset->renderToOutpage( $wgOut ); + $wgOut->addHTML( "
\n\n" ); $wgOut->addHTML( " +
@@ -458,6 +472,7 @@ class PreferencesForm {
* {$tzt}
+
\n" ); } -- 2.20.1