CC-2814: Login error messages need to be highlighted

- done
- Recaptcha box and submit button is moved to center
This commit is contained in:
James 2011-09-14 17:50:00 -04:00
parent f60a4439be
commit 1e4bcdf831
5 changed files with 15 additions and 5 deletions

View File

@ -18,6 +18,7 @@ class LoginController extends Zend_Controller_Action
//uses separate layout without a navigation. //uses separate layout without a navigation.
$this->_helper->layout->setLayout('login'); $this->_helper->layout->setLayout('login');
$error = false;
$request = $this->getRequest(); $request = $this->getRequest();
$baseUrl = $request->getBaseUrl(); $baseUrl = $request->getBaseUrl();
@ -73,12 +74,14 @@ class LoginController extends Zend_Controller_Action
Application_Model_Subjects::increaseLoginAttempts($username); Application_Model_Subjects::increaseLoginAttempts($username);
Application_Model_LoginAttempts::increaseAttempts($_SERVER['REMOTE_ADDR']); Application_Model_LoginAttempts::increaseAttempts($_SERVER['REMOTE_ADDR']);
$form = new Application_Form_Login(); $form = new Application_Form_Login();
$error = true;
} }
} }
} }
} }
$this->view->message = $message; $this->view->message = $message;
$this->view->error = $error;
$this->view->form = $form; $this->view->form = $form;
$this->view->airtimeVersion = AIRTIME_VERSION; $this->view->airtimeVersion = AIRTIME_VERSION;
$this->view->airtimeCopyright = AIRTIME_COPYRIGHT_DATE; $this->view->airtimeCopyright = AIRTIME_COPYRIGHT_DATE;

View File

@ -43,7 +43,7 @@ class Application_Form_Login extends Zend_Form
$this->addElement('submit', 'submit', array( $this->addElement('submit', 'submit', array(
'ignore' => true, 'ignore' => true,
'label' => 'Login', 'label' => 'Login',
'class' => 'ui-button ui-widget ui-state-default ui-button-text-only' 'class' => 'ui-button ui-widget ui-state-default ui-button-text-only center'
)); ));
} }

View File

@ -1,9 +1,8 @@
<div class="login_box"> <div class="login_box">
<div class="logobox">&nbsp;</div> <div class="logobox">&nbsp;</div>
<h2>Login</h2> <h2>Login</h2>
<div id="login" class="login-content clearfix"> <div id="login" class="login-content clearfix">
<p class="light"><?php echo $this->message; ?></p> <p class="light" style='<?php echo $this->error?"color:#902d2d;font-size:11px;padding:2px 4px;background:#c6b4b4;margin-bottom:2px;border:1px solid #c83f3f;":""?>'><?php echo $this->message; ?></p>
<?php echo $this->form; ?> <?php echo $this->form; ?>
</div> </div>
</div> </div>

View File

@ -1986,4 +1986,9 @@ dt.block-display.info-block {
.stream-setting-content { .stream-setting-content {
margin-top:-1px; margin-top:-1px;
} }
.login-content dd .center {
margin-left: 42%;
}

View File

@ -1,3 +1,6 @@
$(document).ready(function(){ $(window).load(function(){
$("#username").focus() $("#username").focus()
var captcha = $("#captcha-label").next()
captcha.css("padding-left", (((captcha.parents('div:eq(0)').width()-captcha.width())/2+"px")));
}) })