Correction affichage selection préférence

This commit is contained in:
Michael RICOIS 2011-05-06 08:23:36 +00:00
parent 101f8aad06
commit a1f6f6fa54
2 changed files with 6 additions and 3 deletions

View File

@ -57,8 +57,8 @@ class UserController extends Zend_Controller_Action
$request = $this->getRequest();
$messages = '';
$isProfilUpdated = true;
$isPasswordUpdated = true;
$isProfilUpdated = false;
$isPasswordUpdated = false;
$updateResult = false;
$ws = new WsScores();
@ -129,6 +129,7 @@ class UserController extends Zend_Controller_Action
$auth = Zend_Auth::getInstance();
$identity = $auth->getIdentity();
if ($isProfilUpdated && $updateResult) {
Zend_Registry::get('firebug')->info('MISE A JOUR PROFIL DANS SESSION');
$identity = $this->updateProfil($identity->username, $identity->password);
$auth->getStorage()->write($identity);
}
@ -143,6 +144,7 @@ class UserController extends Zend_Controller_Action
|| $identity->profil == 'SuperAdministrateur') {
$isAdmin = true;
}
Zend_Registry::get('firebug')->info($identity);
$this->view->assign('options', $identity);
$this->view->assign('isAdmin', $isAdmin);
$this->view->assign('loginVu', $identity->username);

View File

@ -146,12 +146,13 @@ foreach ($this->droitsClients as $droit) {
<div class="infoTitle StyleInfoLib">Pr&eacute;f&eacute;rences</div>
<div class="infoData last">
<?php
$check = '';
foreach ($this->prefsLib as $code => $lib) {
if (in_array(strtoupper($code), $this->pref)) {
$check = ' checked';
}
?>
<input type="checkbox" name="frmOptions[pref][]" value="<?=$code?>"<?=$check?> class="noborder"/>
<input type="checkbox" name="frmOptions[pref][]" value="<?=strtolower($code)?>"<?=$check?> class="noborder"/>
<?php echo $lib?><br/>
<?php }?>
</div>