Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 2078

Přidáno uživatelem David Raška před asi 11 roky(ů)

Opravy:
- fixes #687 - Oprava informacni zpravy po odhlaseni z error na success

Zobrazit rozdíly:

freenetis/branches/1.1/application/controllers/login.php
*
* @param mixed $error
*/
public function index($error = false)
public function index($error = FALSE, $success = FALSE)
{
cookie::set('testcookie', 'enabled', time()+3600);
......
$login = new View('login/index');
$login->title = __('Login to');
$login->error = (!$error) ? $this->session->get_once('err_message') : $error;
$login->success = $success;
// connnection request
if (mb_strpos($this->session->get('referer'), 'connection_request/add') !== FALSE &&
......
public function logout()
{
$this->session->destroy();
$this->index(__('You have been successfully logged out.'));
$this->index(FALSE, __('You have been successfully logged out.'));
}
}
freenetis/branches/1.1/application/views/login/index.php
<h2 style="margin-bottom: 0.8em"><?php echo __('Login to') ?></h2>
<?php echo form::open(url_lang::base().'login', array('class' => 'login_form')) ?>
<?php if (!empty($error)): ?><div id="error"><strong><?php echo $error ?></strong></div><?php endif; ?>
<?php if (!empty($success)): ?><div id="success"><strong><?php echo $success ?></strong></div><?php endif; ?>
<table cellspacing="0" cellpadding="0" class="form">
<tr>
<th><?php echo form::label('username', __('Login name').':') ?></th>
freenetis/branches/1.1/media/css/installation.css
color: #CC0000;
}
div#success {
background: url(../images/icons/status/success.png) 8px 8px no-repeat;
padding:5px 5px 5px 40px;
margin:0;
min-height: 25px;
background-color: #a9fdc9;
border-color: #068c00;
color: #068c00;
}
div#error strong {
color:#CC0000;
}
div#success strong {
color:#068c00;
}
.warning {
color: red;
}

Také k dispozici: Unified diff