Index: trunk/phase3/skins/monobook/rtl.css |
— | — | @@ -195,7 +195,7 @@ |
196 | 196 | margin-right: 1em; |
197 | 197 | } |
198 | 198 | |
199 | | -.preferences-save-success, #preftoc li, .prefsection fieldset { |
| 199 | +.errorbox, .successbox, #preftoc li, .prefsection fieldset { |
200 | 200 | float: right; |
201 | 201 | } |
202 | 202 | |
Index: trunk/phase3/skins/monobook/main.css |
— | — | @@ -271,21 +271,30 @@ |
272 | 272 | color: red; |
273 | 273 | font-size: larger; |
274 | 274 | } |
275 | | -.errorbox { |
| 275 | +.errorbox, .successbox { |
276 | 276 | font-size: larger; |
277 | | - border: 2px solid red; |
| 277 | + border: 2px solid; |
278 | 278 | padding: .5em 1em; |
279 | 279 | float: left; |
280 | 280 | margin-bottom: 2em; |
| 281 | + color: #000; |
| 282 | +} |
| 283 | +.errorbox { |
| 284 | + border-color: red; |
281 | 285 | background-color: #fff2f2; |
282 | 286 | } |
283 | | -.errorbox h2 { |
| 287 | +.successbox { |
| 288 | + border-color: green; |
| 289 | + background-color: #dfd; |
| 290 | +} |
| 291 | +.errorbox h2, .successbox h2 { |
284 | 292 | font-size: 1em; |
285 | 293 | font-weight: bold; |
286 | 294 | display: inline; |
287 | 295 | margin: 0 .5em 0 0; |
288 | 296 | border: none; |
289 | 297 | } |
| 298 | + |
290 | 299 | #catlinks { |
291 | 300 | border: 1px solid #aaa; |
292 | 301 | background-color: #f9f9f9; |
— | — | @@ -1046,15 +1055,6 @@ |
1047 | 1056 | padding-right: .3em; |
1048 | 1057 | } |
1049 | 1058 | |
1050 | | -.preferences-save-success { |
1051 | | - border: 2px solid green; |
1052 | | - color: #000; |
1053 | | - padding: .5em 1.2em; |
1054 | | - background-color: #ddffdd; |
1055 | | - float: left; |
1056 | | - margin-bottom: 1em; |
1057 | | -} |
1058 | | - |
1059 | 1059 | .preferences-login { |
1060 | 1060 | clear: both; |
1061 | 1061 | margin-bottom: 1.5em; |
Index: trunk/phase3/skins/MonoBook.php |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" /> |
58 | 58 | <?php $this->html('headlinks') ?> |
59 | 59 | <title><?php $this->text('pagetitle') ?></title> |
60 | | - <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?4"; /*]]>*/</style> |
| 60 | + <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?5"; /*]]>*/</style> |
61 | 61 | <link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('stylepath') ?>/common/commonPrint.css" /> |
62 | 62 | <!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css";</style><![endif]--> |
63 | 63 | <!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css";</style><![endif]--> |
Index: trunk/phase3/includes/SpecialUserlogin.php |
— | — | @@ -366,7 +366,7 @@ |
367 | 367 | if( WikiError::isError( $result ) ) { |
368 | 368 | $this->mainLoginForm( wfMsg( 'mailerror', $result->getMessage() ) ); |
369 | 369 | } else { |
370 | | - $this->mainLoginForm( wfMsg( 'passwordsent', $u->getName() ) ); |
| 370 | + $this->mainLoginForm( wfMsg( 'passwordsent', $u->getName() ), 'success' ); |
371 | 371 | } |
372 | 372 | } |
373 | 373 | |
— | — | @@ -435,7 +435,7 @@ |
436 | 436 | /** |
437 | 437 | * @access private |
438 | 438 | */ |
439 | | - function mainLoginForm( $err ) { |
| 439 | + function mainLoginForm( $msg, $msgtype = 'error' ) { |
440 | 440 | global $wgUser, $wgOut, $wgLang; |
441 | 441 | global $wgDBname, $wgAllowRealName, $wgEnableEmail; |
442 | 442 | global $wgAuth; |
— | — | @@ -456,12 +456,12 @@ |
457 | 457 | $template =& new UsercreateTemplate(); |
458 | 458 | $q = 'action=submitlogin&type=signup'; |
459 | 459 | $linkq = 'type=login'; |
460 | | - $msg = 'gotaccount'; |
| 460 | + $linkmsg = 'gotaccount'; |
461 | 461 | } else { |
462 | 462 | $template =& new UserloginTemplate(); |
463 | 463 | $q = 'action=submitlogin&type=login'; |
464 | 464 | $linkq = 'type=signup'; |
465 | | - $msg = 'nologin'; |
| 465 | + $linkmsg = 'nologin'; |
466 | 466 | } |
467 | 467 | |
468 | 468 | if ( !empty( $this->mReturnto ) ) { |
— | — | @@ -471,10 +471,10 @@ |
472 | 472 | } |
473 | 473 | |
474 | 474 | $link = '<a href="' . htmlspecialchars ( $titleObj->getLocalUrl( $linkq ) ) . '">'; |
475 | | - $link .= wfMsgHtml( $msg . 'link' ); |
| 475 | + $link .= wfMsgHtml( $linkmsg . 'link' ); |
476 | 476 | $link .= '</a>'; |
477 | 477 | |
478 | | - $template->set( 'link', wfMsgHtml( $msg, $link ) ); |
| 478 | + $template->set( 'link', wfMsgHtml( $linkmsg, $link ) ); |
479 | 479 | |
480 | 480 | $template->set( 'name', $this->mName ); |
481 | 481 | $template->set( 'password', $this->mPassword ); |
— | — | @@ -484,7 +484,8 @@ |
485 | 485 | $template->set( 'domain', $this->mDomain ); |
486 | 486 | |
487 | 487 | $template->set( 'action', $titleObj->getLocalUrl( $q ) ); |
488 | | - $template->set( 'error', $err ); |
| 488 | + $template->set( 'message', $msg ); |
| 489 | + $template->set( 'messagetype', $msgtype ); |
489 | 490 | $template->set( 'create', $wgUser->isAllowedToCreateAccount() ); |
490 | 491 | $template->set( 'createemail', $wgEnableEmail && $wgUser->isLoggedIn() ); |
491 | 492 | $template->set( 'userealname', $wgAllowRealName ); |
Index: trunk/phase3/includes/SpecialPreferences.php |
— | — | @@ -435,9 +435,9 @@ |
436 | 436 | $wgOut->setRobotpolicy( 'noindex,nofollow' ); |
437 | 437 | |
438 | 438 | if ( $this->mSuccess || 'success' == $status ) { |
439 | | - $wgOut->addWikitext( '<div class="preferences-save-success"><strong>'. wfMsg( 'savedprefs' ) . '</strong></div>' ); |
| 439 | + $wgOut->addWikitext( '<div class="successbox"><strong>'. wfMsg( 'savedprefs' ) . '</strong></div>' ); |
440 | 440 | } else if ( 'error' == $status ) { |
441 | | - $wgOut->addWikitext( '<div class="error"><strong>' . $message . '</strong></div>' ); |
| 441 | + $wgOut->addWikitext( '<div class="errorbox"><strong>' . $message . '</strong></div>' ); |
442 | 442 | } else if ( '' != $status ) { |
443 | 443 | $wgOut->addWikitext( $message . "\n----" ); |
444 | 444 | } |
Index: trunk/phase3/includes/templates/Userlogin.php |
— | — | @@ -15,11 +15,13 @@ |
16 | 16 | */ |
17 | 17 | class UserloginTemplate extends QuickTemplate { |
18 | 18 | function execute() { |
19 | | - if( $this->data['error'] ) { |
| 19 | + if( $this->data['message'] ) { |
20 | 20 | ?> |
21 | | - <div class="errorbox"> |
22 | | - <h2><?php $this->msg('loginerror') ?>:</h2> |
23 | | - <?php $this->html('error') ?> |
| 21 | + <div class="<?php $this->text('messagetype') ?>box"> |
| 22 | + <?php if ( $this->data['messagetype'] == 'error' ) { ?> |
| 23 | + <h2><?php $this->msg('loginerror') ?>:</h2> |
| 24 | + <?php } ?> |
| 25 | + <?php $this->html('message') ?> |
24 | 26 | </div> |
25 | 27 | <div class="visualClear"></div> |
26 | 28 | <?php } ?> |
— | — | @@ -71,7 +73,7 @@ |
72 | 74 | <tr> |
73 | 75 | <td></td> |
74 | 76 | <td align='left' style="white-space:nowrap"> |
75 | | - <input type='submit' name="wpLoginattempt" id="wpLoginattempt" value="<?php $this->msg('login') ?>" /> <?php if( $this->data['useemail'] ) { ?><input type='submit' name="wpMailmypassword" |
| 77 | + <input type='submit' name="wpLoginattempt" id="wpLoginattempt" value="<?php $this->msg('login') ?>" /> <?php if( $this->data['useemail'] ) { ?><input type='submit' name="wpMailmypassword" id="wpMailmypassword" |
76 | 78 | value="<?php $this->msg('mailmypassword') ?>" /> |
77 | 79 | <?php } ?> |
78 | 80 | </td> |
— | — | @@ -87,11 +89,10 @@ |
88 | 90 | |
89 | 91 | class UsercreateTemplate extends QuickTemplate { |
90 | 92 | function execute() { |
91 | | - if( $this->data['error'] ) { |
| 93 | + if( $this->data['message'] ) { |
92 | 94 | ?> |
93 | | - <div class="errorbox"> |
94 | | - <h2><?php $this->msg('loginerror') ?>:</h2> |
95 | | - <?php $this->html('error') ?> |
| 95 | + <div class="<?php $this->text('messageclass') ?>"> |
| 96 | + <?php $this->html('message') ?> |
96 | 97 | </div> |
97 | 98 | <div class="visualClear"></div> |
98 | 99 | <?php } ?> |