$wgOut->setRobotpolicy( 'noindex,nofollow' );
if ( $this->mSuccess || 'success' == $status ) {
- $wgOut->addWikitext( '<div class="preferences-save-success"><strong>'. wfMsg( 'savedprefs' ) . '</strong></div>' );
+ $wgOut->addWikitext( '<div class="successbox"><strong>'. wfMsg( 'savedprefs' ) . '</strong></div>' );
} else if ( 'error' == $status ) {
- $wgOut->addWikitext( '<div class="error"><strong>' . $message . '</strong></div>' );
+ $wgOut->addWikitext( '<div class="errorbox"><strong>' . $message . '</strong></div>' );
} else if ( '' != $status ) {
$wgOut->addWikitext( $message . "\n----" );
}
if( WikiError::isError( $result ) ) {
$this->mainLoginForm( wfMsg( 'mailerror', $result->getMessage() ) );
} else {
- $this->mainLoginForm( wfMsg( 'passwordsent', $u->getName() ) );
+ $this->mainLoginForm( wfMsg( 'passwordsent', $u->getName() ), 'success' );
}
}
/**
* @access private
*/
- function mainLoginForm( $err ) {
+ function mainLoginForm( $msg, $msgtype = 'error' ) {
global $wgUser, $wgOut, $wgLang;
global $wgDBname, $wgAllowRealName, $wgEnableEmail;
global $wgAuth;
$template =& new UsercreateTemplate();
$q = 'action=submitlogin&type=signup';
$linkq = 'type=login';
- $msg = 'gotaccount';
+ $linkmsg = 'gotaccount';
} else {
$template =& new UserloginTemplate();
$q = 'action=submitlogin&type=login';
$linkq = 'type=signup';
- $msg = 'nologin';
+ $linkmsg = 'nologin';
}
if ( !empty( $this->mReturnto ) ) {
}
$link = '<a href="' . htmlspecialchars ( $titleObj->getLocalUrl( $linkq ) ) . '">';
- $link .= wfMsgHtml( $msg . 'link' );
+ $link .= wfMsgHtml( $linkmsg . 'link' );
$link .= '</a>';
- $template->set( 'link', wfMsgHtml( $msg, $link ) );
+ $template->set( 'link', wfMsgHtml( $linkmsg, $link ) );
$template->set( 'name', $this->mName );
$template->set( 'password', $this->mPassword );
$template->set( 'domain', $this->mDomain );
$template->set( 'action', $titleObj->getLocalUrl( $q ) );
- $template->set( 'error', $err );
+ $template->set( 'message', $msg );
+ $template->set( 'messagetype', $msgtype );
$template->set( 'create', $wgUser->isAllowedToCreateAccount() );
$template->set( 'createemail', $wgEnableEmail && $wgUser->isLoggedIn() );
$template->set( 'userealname', $wgAllowRealName );
*/
class UserloginTemplate extends QuickTemplate {
function execute() {
- if( $this->data['error'] ) {
+ if( $this->data['message'] ) {
?>
- <div class="errorbox">
- <h2><?php $this->msg('loginerror') ?>:</h2>
- <?php $this->html('error') ?>
+ <div class="<?php $this->text('messagetype') ?>box">
+ <?php if ( $this->data['messagetype'] == 'error' ) { ?>
+ <h2><?php $this->msg('loginerror') ?>:</h2>
+ <?php } ?>
+ <?php $this->html('message') ?>
</div>
<div class="visualClear"></div>
<?php } ?>
<tr>
<td></td>
<td align='left' style="white-space:nowrap">
- <input type='submit' name="wpLoginattempt" id="wpLoginattempt" value="<?php $this->msg('login') ?>" /> <?php if( $this->data['useemail'] ) { ?><input type='submit' name="wpMailmypassword"
+ <input type='submit' name="wpLoginattempt" id="wpLoginattempt" value="<?php $this->msg('login') ?>" /> <?php if( $this->data['useemail'] ) { ?><input type='submit' name="wpMailmypassword" id="wpMailmypassword"
value="<?php $this->msg('mailmypassword') ?>" />
<?php } ?>
</td>
class UsercreateTemplate extends QuickTemplate {
function execute() {
- if( $this->data['error'] ) {
+ if( $this->data['message'] ) {
?>
- <div class="errorbox">
- <h2><?php $this->msg('loginerror') ?>:</h2>
- <?php $this->html('error') ?>
+ <div class="<?php $this->text('messageclass') ?>">
+ <?php $this->html('message') ?>
</div>
<div class="visualClear"></div>
<?php } ?>
<meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
<?php $this->html('headlinks') ?>
<title><?php $this->text('pagetitle') ?></title>
- <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?4"; /*]]>*/</style>
+ <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?5"; /*]]>*/</style>
<link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('stylepath') ?>/common/commonPrint.css" />
<!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css";</style><![endif]-->
<!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css";</style><![endif]-->
color: red;
font-size: larger;
}
-.errorbox {
+.errorbox, .successbox {
font-size: larger;
- border: 2px solid red;
+ border: 2px solid;
padding: .5em 1em;
float: left;
margin-bottom: 2em;
+ color: #000;
+}
+.errorbox {
+ border-color: red;
background-color: #fff2f2;
}
-.errorbox h2 {
+.successbox {
+ border-color: green;
+ background-color: #dfd;
+}
+.errorbox h2, .successbox h2 {
font-size: 1em;
font-weight: bold;
display: inline;
margin: 0 .5em 0 0;
border: none;
}
+
#catlinks {
border: 1px solid #aaa;
background-color: #f9f9f9;
padding-right: .3em;
}
-.preferences-save-success {
- border: 2px solid green;
- color: #000;
- padding: .5em 1.2em;
- background-color: #ddffdd;
- float: left;
- margin-bottom: 1em;
-}
-
.preferences-login {
clear: both;
margin-bottom: 1.5em;
margin-right: 1em;
}
-.preferences-save-success, #preftoc li, .prefsection fieldset {
+.errorbox, .successbox, #preftoc li, .prefsection fieldset {
float: right;
}