SAAS-155: Add possibility to show additional information on
login page (for demo site) - username and password are auto filled on demo site - added informative msg on demo site about username and password
This commit is contained in:
parent
63b2fa94de
commit
3a8ba36e0d
4 changed files with 22 additions and 6 deletions
|
@ -81,5 +81,9 @@ class Config {
|
|||
|
||||
$CC_CONFIG['soundcloud-connection-retries'] = $values['soundcloud']['connection_retries'];
|
||||
$CC_CONFIG['soundcloud-connection-wait'] = $values['soundcloud']['time_between_retries'];
|
||||
|
||||
if(isset($values['demo']['demo'])){
|
||||
$CC_CONFIG['demo'] = $values['demo']['demo'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ class LoginController extends Zend_Controller_Action
|
|||
|
||||
public function indexAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
|
||||
if(Zend_Auth::getInstance()->hasIdentity())
|
||||
{
|
||||
$this->_redirect('Nowplaying');
|
||||
|
@ -85,6 +87,9 @@ class LoginController extends Zend_Controller_Action
|
|||
$this->view->form = $form;
|
||||
$this->view->airtimeVersion = Application_Model_Preference::GetAirtimeVersion();
|
||||
$this->view->airtimeCopyright = AIRTIME_COPYRIGHT_DATE;
|
||||
if(isset($CC_CONFIG['demo'])){
|
||||
$this->view->demo = $CC_CONFIG['demo'];
|
||||
}
|
||||
}
|
||||
|
||||
public function logoutAction()
|
||||
|
|
|
@ -5,6 +5,8 @@ class Application_Form_Login extends Zend_Form
|
|||
|
||||
public function init()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
|
||||
// Set the method for the display form to POST
|
||||
$this->setMethod('post');
|
||||
|
||||
|
@ -13,6 +15,7 @@ class Application_Form_Login extends Zend_Form
|
|||
'label' => 'Username:',
|
||||
'class' => 'input_text',
|
||||
'required' => true,
|
||||
'value' => (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
|
@ -24,6 +27,7 @@ class Application_Form_Login extends Zend_Form
|
|||
'label' => 'Password:',
|
||||
'class' => 'input_text',
|
||||
'required' => true,
|
||||
'value' => (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<div class="logobox"> </div>
|
||||
<h2>Login</h2>
|
||||
<div id="login" class="login-content clearfix">
|
||||
<?php if(isset($this->demo) && $this->demo == 1){?>
|
||||
<p style="font-weight:bold">Welcome to the online Airtime demo! You can log in using the username 'admin' and the password 'admin'.</p>
|
||||
<?php }?>
|
||||
<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; ?>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue