dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
63852f7
)
Make e-mail password message not display as error; new successbox class; kill off...
author
Tom Gilder
<tomgilder@users.mediawiki.org>
Fri, 2 Dec 2005 02:41:48 +0000
(
02:41
+0000)
committer
Tom Gilder
<tomgilder@users.mediawiki.org>
Fri, 2 Dec 2005 02:41:48 +0000
(
02:41
+0000)
includes/SpecialPreferences.php
patch
|
blob
|
history
includes/SpecialUserlogin.php
patch
|
blob
|
history
includes/templates/Userlogin.php
patch
|
blob
|
history
skins/MonoBook.php
patch
|
blob
|
history
skins/monobook/main.css
patch
|
blob
|
history
skins/monobook/rtl.css
patch
|
blob
|
history
diff --git
a/includes/SpecialPreferences.php
b/includes/SpecialPreferences.php
index
fd51c36
..
ebbb6da
100644
(file)
--- a/
includes/SpecialPreferences.php
+++ b/
includes/SpecialPreferences.php
@@
-435,9
+435,9
@@
class PreferencesForm {
$wgOut->setRobotpolicy( 'noindex,nofollow' );
if ( $this->mSuccess || 'success' == $status ) {
$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 ) {
} else if ( 'error' == $status ) {
- $wgOut->addWikitext( '<div class="error"><strong>' . $message . '</strong></div>' );
+ $wgOut->addWikitext( '<div class="error
box
"><strong>' . $message . '</strong></div>' );
} else if ( '' != $status ) {
$wgOut->addWikitext( $message . "\n----" );
}
} else if ( '' != $status ) {
$wgOut->addWikitext( $message . "\n----" );
}
diff --git
a/includes/SpecialUserlogin.php
b/includes/SpecialUserlogin.php
index
416703e
..
f304ac0
100644
(file)
--- a/
includes/SpecialUserlogin.php
+++ b/
includes/SpecialUserlogin.php
@@
-366,7
+366,7
@@
class LoginForm {
if( WikiError::isError( $result ) ) {
$this->mainLoginForm( wfMsg( 'mailerror', $result->getMessage() ) );
} else {
if( WikiError::isError( $result ) ) {
$this->mainLoginForm( wfMsg( 'mailerror', $result->getMessage() ) );
} else {
- $this->mainLoginForm( wfMsg( 'passwordsent', $u->getName() ) );
+ $this->mainLoginForm( wfMsg( 'passwordsent', $u->getName() )
, 'success'
);
}
}
}
}
@@
-435,7
+435,7
@@
class LoginForm {
/**
* @access private
*/
/**
* @access private
*/
- function mainLoginForm( $
err
) {
+ function mainLoginForm( $
msg, $msgtype = 'error'
) {
global $wgUser, $wgOut, $wgLang;
global $wgDBname, $wgAllowRealName, $wgEnableEmail;
global $wgAuth;
global $wgUser, $wgOut, $wgLang;
global $wgDBname, $wgAllowRealName, $wgEnableEmail;
global $wgAuth;
@@
-456,12
+456,12
@@
class LoginForm {
$template =& new UsercreateTemplate();
$q = 'action=submitlogin&type=signup';
$linkq = 'type=login';
$template =& new UsercreateTemplate();
$q = 'action=submitlogin&type=signup';
$linkq = 'type=login';
- $msg = 'gotaccount';
+ $
link
msg = 'gotaccount';
} else {
$template =& new UserloginTemplate();
$q = 'action=submitlogin&type=login';
$linkq = 'type=signup';
} else {
$template =& new UserloginTemplate();
$q = 'action=submitlogin&type=login';
$linkq = 'type=signup';
- $msg = 'nologin';
+ $
link
msg = 'nologin';
}
if ( !empty( $this->mReturnto ) ) {
}
if ( !empty( $this->mReturnto ) ) {
@@
-471,10
+471,10
@@
class LoginForm {
}
$link = '<a href="' . htmlspecialchars ( $titleObj->getLocalUrl( $linkq ) ) . '">';
}
$link = '<a href="' . htmlspecialchars ( $titleObj->getLocalUrl( $linkq ) ) . '">';
- $link .= wfMsgHtml( $msg . 'link' );
+ $link .= wfMsgHtml( $
link
msg . 'link' );
$link .= '</a>';
$link .= '</a>';
- $template->set( 'link', wfMsgHtml( $msg, $link ) );
+ $template->set( 'link', wfMsgHtml( $
link
msg, $link ) );
$template->set( 'name', $this->mName );
$template->set( 'password', $this->mPassword );
$template->set( 'name', $this->mName );
$template->set( 'password', $this->mPassword );
@@
-484,7
+484,8
@@
class LoginForm {
$template->set( 'domain', $this->mDomain );
$template->set( 'action', $titleObj->getLocalUrl( $q ) );
$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 );
$template->set( 'create', $wgUser->isAllowedToCreateAccount() );
$template->set( 'createemail', $wgEnableEmail && $wgUser->isLoggedIn() );
$template->set( 'userealname', $wgAllowRealName );
diff --git
a/includes/templates/Userlogin.php
b/includes/templates/Userlogin.php
index
7a6f03a
..
d00851e
100644
(file)
--- a/
includes/templates/Userlogin.php
+++ b/
includes/templates/Userlogin.php
@@
-15,11
+15,13
@@
require_once( 'includes/SkinTemplate.php' );
*/
class UserloginTemplate extends QuickTemplate {
function execute() {
*/
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 } ?>
</div>
<div class="visualClear"></div>
<?php } ?>
@@
-71,7
+73,7
@@
class UserloginTemplate extends QuickTemplate {
<tr>
<td></td>
<td align='left' style="white-space:nowrap">
<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>
value="<?php $this->msg('mailmypassword') ?>" />
<?php } ?>
</td>
@@
-87,11
+89,10
@@
class UserloginTemplate extends QuickTemplate {
class UsercreateTemplate extends QuickTemplate {
function execute() {
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 } ?>
</div>
<div class="visualClear"></div>
<?php } ?>
diff --git
a/skins/MonoBook.php
b/skins/MonoBook.php
index
2886f65
..
3c890f3
100644
(file)
--- a/
skins/MonoBook.php
+++ b/
skins/MonoBook.php
@@
-56,7
+56,7
@@
class MonoBookTemplate extends QuickTemplate {
<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>
<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]-->
<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]-->
diff --git
a/skins/monobook/main.css
b/skins/monobook/main.css
index
c28f289
..
a2b52cc
100644
(file)
--- a/
skins/monobook/main.css
+++ b/
skins/monobook/main.css
@@
-271,21
+271,30
@@
span.subpages {
color: red;
font-size: larger;
}
color: red;
font-size: larger;
}
-.errorbox {
+.errorbox
, .successbox
{
font-size: larger;
font-size: larger;
- border: 2px solid
red
;
+ border: 2px solid;
padding: .5em 1em;
float: left;
margin-bottom: 2em;
padding: .5em 1em;
float: left;
margin-bottom: 2em;
+ color: #000;
+}
+.errorbox {
+ border-color: red;
background-color: #fff2f2;
}
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;
}
font-size: 1em;
font-weight: bold;
display: inline;
margin: 0 .5em 0 0;
border: none;
}
+
#catlinks {
border: 1px solid #aaa;
background-color: #f9f9f9;
#catlinks {
border: 1px solid #aaa;
background-color: #f9f9f9;
@@
-1046,15
+1055,6
@@
div.prefsectiontip {
padding-right: .3em;
}
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;
.preferences-login {
clear: both;
margin-bottom: 1.5em;
diff --git
a/skins/monobook/rtl.css
b/skins/monobook/rtl.css
index
7da860a
..
13930dc
100644
(file)
--- a/
skins/monobook/rtl.css
+++ b/
skins/monobook/rtl.css
@@
-195,7
+195,7
@@
li#pt-login {
margin-right: 1em;
}
margin-right: 1em;
}
-.
preferences-save-success
, #preftoc li, .prefsection fieldset {
+.
errorbox, .successbox
, #preftoc li, .prefsection fieldset {
float: right;
}
float: right;
}