Sélection du client

This commit is contained in:
Michael RICOIS 2012-12-04 16:40:37 +00:00
parent b2721a01fd
commit 0b1bfe2ca7
2 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,8 @@ class IndexController extends Zend_Controller_Action
{
$request = $this->getRequest();
$idClient = $request->getParam('idClient', null);
$this->view->assign('idClient', $idClient);
//Liste des profils
$profilM = new Application_Model_Profil();
$sql = $profilM->select();

View File

@ -83,10 +83,11 @@
<select name="idClient">
<option value="">-</option>
<?php foreach ($this->clients as $client) {?>
<option value="<?=$client->id?>"><?=$client->nom?></option>
<?php $select = ''; if ( $client->id == $this->idClient) { $select = ' selected'; }?>
<option value="<?=$client->id?>"<?=$select?>><?=$client->nom?></option>
<?php }?>
</select>
<input type="submit" name="Selection" />
<input type="submit" name="submit" value="Selection" />
</form>
</div>