issue #0001372 : Edition fiche

This commit is contained in:
Michael RICOIS 2013-01-09 08:27:44 +00:00
parent 05fb0ede75
commit 8e5e443eaa
3 changed files with 50 additions and 6 deletions

View File

@ -2138,12 +2138,23 @@ class SaisieController extends Zend_Controller_Action
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$id = $request->getParam('idFiche');
$this->view->assign('edit', $id);
$id = $request->getParam('idFiche', null);
$ws = new WsScores();
if ($id===null) {
$siren = $request->getParam('siren');
$result = $ws->searchLienRef($siren, 'siren');
if (count($result->item)>0) {
foreach ($result->item as $item) {
$id = $item->id;
break;
}
}
}
$this->view->assign('edit', $id);
$this->view->assign('currencies', $this->currencies);
$this->view->assign('countries', $this->countries);

View File

@ -37,15 +37,35 @@
echo $this->action('liendoc', 'identite', null, array('id'=>$this->lienref, 'type'=>'Entreprise'));
}
?>
</tr>
<?php if ($this->edition) {?>
<br/>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"></td>
<td width="350" class="StyleInfoLib">
<a class="dialog" title="Lier un document" href="<?=$this->url(array('controller'=>'saisie','action'=>'liendoc','siren'=>$this->siren), null, true)?>">
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/page_white_put.png" />
Lier un document (organigramme du groupe)
</a>
</td>
<?php }?>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"></td>
<td width="350" class="StyleInfoLib">
<?php
if ($this->siren) {
$href = $this->url(array('controller'=>'saisie', 'action'=>'lienfiche', 'siren'=>$this->siren),null,true);
} else {
$href = $this->url(array('controller'=>'saisie', 'action'=>'lienfiche', 'idFiche'=>$this->idFiche),null,true);
}
?>
<a class="dialog" title="Edition fiche" href="<?=$href?>">
Editer la fiche
</a>
</td>
</tr>
<?php }?>
</table>
</div>
<?php }?>

View File

@ -35,10 +35,23 @@
<div class="field">
<input type="text" size="10" name="naissance_date" value="<?=$this->naissance_date?>"/>
à <input type="text" name="naissance_lieu" value="<?=$this->naissance_lieu?>"/>
<select name="naissance_dept_pays">
<option>-</option>
<?php foreach($this->countries as $code => $item) {?>
<?php $select = ''; if ($this->naissance_dept_pays==$code) $select = 'selected';?>
<option value="<?=$code?>"<?=$select?>><?=$item['libPays']?></option>
<?php }?>
</select>
</div>
</div>
<div class="fieldgrp">
<label>Nationnalité</label>
<select name="nat">
<option>-</option>
<?php foreach($this->countries as $code => $item) {?>
<option value="<?=$code?>"><?=$item['libPays']?></option>
<?php $select = ''; if ($this->nat==$code) $select = 'selected';?>
<option value="<?=$code?>"<?=$select?>><?=$item['libPays']?></option>
<?php }?>
</select>
</div>