Merge from 1.3
This commit is contained in:
commit
1bd005020a
@ -340,7 +340,7 @@ class GestionController extends Zend_Controller_Action
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$idClient= $request->getParam('id', null);
|
||||
$idClient= $request->getParam('idClient', null);
|
||||
$this->view->assign('idClient', $idClient);
|
||||
|
||||
if ($idClient !== null) {
|
||||
@ -415,18 +415,24 @@ class GestionController extends Zend_Controller_Action
|
||||
|
||||
if ($request->getParam('submit')=='Modifier') {
|
||||
//Overwrite default profil for each login
|
||||
$profilM = new Application_Model_EnrichissementProfils();
|
||||
$profilM->update(
|
||||
array('criteres', json_encode($params['criteres'])),
|
||||
"reference='default' AND idClient=".$params['idClient']);
|
||||
try {
|
||||
$profilM = new Application_Model_EnrichissementProfils();
|
||||
$profilM->update(array(
|
||||
'criteres' => json_encode($params['criteres'])
|
||||
), "reference='default' AND idClient=".$params['idClient']);
|
||||
} catch ( Zend_Db_Adapter_Exception $e) {
|
||||
Zend_Registry::get('firebug')->info($e->getMessage());
|
||||
}
|
||||
|
||||
//Set parameters
|
||||
$customerParamsM = new Application_Model_CustomerParams();
|
||||
if ( $customerParamsM->update($data, 'id='.$params['id']) ){
|
||||
try {
|
||||
$customerParamsM = new Application_Model_CustomerParams();
|
||||
$customerParamsM->update($data, 'id='.$params['id']);
|
||||
$this->view->assign('message', "Profil enregistré");
|
||||
} else {
|
||||
$this->view->assign('message', "Erreur lors de la sauvegarde");
|
||||
}
|
||||
} catch ( Zend_Db_Adapter_Exception $e) {
|
||||
Zend_Registry::get('firebug')->info($e->getMessage());
|
||||
$this->view->assign('message', "Erreur lors de la sauvegarde");
|
||||
}
|
||||
|
||||
} else {
|
||||
//Set parameters
|
||||
@ -443,7 +449,7 @@ class GestionController extends Zend_Controller_Action
|
||||
}
|
||||
} else {
|
||||
|
||||
$idClient = $request->getParam('id', null);
|
||||
$idClient = $request->getParam('idClient', null);
|
||||
|
||||
if ($idClient !== null) {
|
||||
$paramsM = new Application_Model_CustomerParams();
|
||||
|
@ -23,7 +23,7 @@
|
||||
<tr><td>dateAdded</td><td><?=$this->infos['dateAdded']?></td></tr>
|
||||
</table>
|
||||
|
||||
<a href="<?=$this->url(array('controller'=>'gestion','action'=>'customerparamadd','id'=>$this->idClient),null,true)?>">Modifier</a>
|
||||
<a href="<?=$this->url(array('controller'=>'gestion','action'=>'customerparamadd','idClient'=>$this->idClient),null,true)?>">Modifier</a>
|
||||
|
||||
<h2>Logins autorisés</h2>
|
||||
<div class="paragraph">
|
||||
|
@ -1,7 +1,11 @@
|
||||
<div id="dashboard">
|
||||
|
||||
<?php if ($this->message) {?>
|
||||
|
||||
<?=$this->message?>
|
||||
|
||||
<?php } else {?>
|
||||
|
||||
<form name="profil" method="post" action="<?=$this->url(array('controller'=>'gestion', 'action'=>'customerparamadd'))?>">
|
||||
|
||||
<?php if ($this->id) {?>
|
||||
@ -99,4 +103,5 @@ Nombre maximal de fichier pouvant être extrait
|
||||
<?php }?>
|
||||
</form>
|
||||
|
||||
<?php }?>
|
||||
</div>
|
@ -24,7 +24,7 @@
|
||||
<?=$login?><br/>
|
||||
<?php }?>
|
||||
</td>
|
||||
<td><a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'customerparam', 'id'=>$item['idClient']))?>">Détail</a></td>
|
||||
<td><a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'customerparam', 'idClient'=>$item['idClient']))?>">Détail</a></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user