issue #0001372 : Delete and id forms
This commit is contained in:
parent
76a9bced55
commit
77c590f927
@ -1513,17 +1513,29 @@ class SaisieController extends Zend_Controller_Action
|
||||
|
||||
$result = $ws->getSaisieLien($idLien);
|
||||
$infos = json_decode($result, true);
|
||||
|
||||
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
|
||||
if ($type=='actionnaire') {
|
||||
$this->view->assign('id1', $infos['idPar']);
|
||||
$this->view->assign('id2', $infos['idAct']);
|
||||
} elseif (type=='participation') {
|
||||
$idFiche = $infos['idAct'];
|
||||
} elseif ($type=='participation') {
|
||||
$this->view->assign('id2', $infos['idPar']);
|
||||
$this->view->assign('id1', $infos['idAct']);
|
||||
$idFiche = $infos['idPar'];
|
||||
}
|
||||
|
||||
|
||||
if ($idFiche) {
|
||||
$result = $ws->getLienRef($idFiche);
|
||||
if ($result->raisonSociale!='') {
|
||||
$this->view->assign('rs2', $result->raisonSociale);
|
||||
} else {
|
||||
$this->view->assign('rs2', $result->nom);
|
||||
}
|
||||
$this->view->assign('siren2', $result->siren);
|
||||
}
|
||||
|
||||
$this->view->assign('PDetention', $infos['PDetention']);
|
||||
$this->view->assign('Pvote', $infos['Pvote']);
|
||||
$this->view->assign('MajMin', $infos['MajMin']);
|
||||
@ -1546,7 +1558,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
if ($type=='actionnaire') {
|
||||
$this->view->assign('id1', $infos['idPar']);
|
||||
$this->view->assign('id2', $infos['idAct']);
|
||||
} elseif (type=='participation') {
|
||||
} elseif ($type=='participation') {
|
||||
$this->view->assign('id2', $infos['idPar']);
|
||||
$this->view->assign('id1', $infos['idAct']);
|
||||
}
|
||||
@ -1765,17 +1777,28 @@ class SaisieController extends Zend_Controller_Action
|
||||
$idAct = $params['id1'];
|
||||
}
|
||||
|
||||
$infos = array(
|
||||
'idAct' => $idAct,
|
||||
'PDetention' => $params['PDetention'],
|
||||
'Pvote' => $params['Pvote'],
|
||||
'MajMin' => $params['MajMin'],
|
||||
'idPar' => $idPar,
|
||||
'dateEffetLien' => empty($params['dateEffetLien']) ? date('Ymd') : $params['dateEffetLien'],
|
||||
'docRef' => empty($params['docRef']) ? '' : $params['docRef'],
|
||||
'dateDocRef' => empty($params['dateDocRef']) ? '' : $params['dateDocRef'],
|
||||
);
|
||||
|
||||
if ($params['mode']=='delete') {
|
||||
$infos = array(
|
||||
'actif' => 0,
|
||||
'dateEffetLien' => empty($params['dateEffetLien']) ? date('Ymd') : $params['dateEffetLien'],
|
||||
'docRef' => empty($params['docRef']) ? '' : $params['docRef'],
|
||||
'dateDocRef' => empty($params['dateDocRef']) ? '' : $params['dateDocRef'],
|
||||
'motifUpdate' => empty($params['motifUpdate']) ? '' : $params['motifUpdate'],
|
||||
);
|
||||
} else {
|
||||
$infos = array(
|
||||
'idAct' => $idAct,
|
||||
'actif' => 1,
|
||||
'PDetention' => $params['PDetention'],
|
||||
'Pvote' => $params['Pvote'],
|
||||
'MajMin' => $params['MajMin'],
|
||||
'idPar' => $idPar,
|
||||
'dateEffetLien' => empty($params['dateEffetLien']) ? date('Ymd') : $params['dateEffetLien'],
|
||||
'docRef' => empty($params['docRef']) ? '' : $params['docRef'],
|
||||
'dateDocRef' => empty($params['dateDocRef']) ? '' : $params['dateDocRef'],
|
||||
'motifUpdate' => empty($params['motifUpdate']) ? '' : $params['motifUpdate'],
|
||||
);
|
||||
}
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
|
||||
$ws = new WsScores();
|
||||
@ -1797,4 +1820,23 @@ class SaisieController extends Zend_Controller_Action
|
||||
$this->view->assign('identifiant', $result->item);
|
||||
}
|
||||
|
||||
public function bourseAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$siret = $request->getParam('siret');
|
||||
$id = $request->getParam('id', 0);
|
||||
|
||||
$this->view->headTitle()->append('Saisie - '.$siret);
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getIdentite($siret, $id);
|
||||
$this->view->assign('etab', $infos);
|
||||
|
||||
}
|
||||
|
||||
public function boursesaveAction()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -81,7 +81,7 @@
|
||||
<?php } else {?>
|
||||
<td>
|
||||
<a class="dialog" title="Modifier participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'edit','siren'=>$this->siren,'idLien'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/editer.png" /></a>
|
||||
<a class="dialog" title="Supprimer participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'delete','idLien'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/supprimer.png" /></a>
|
||||
<a class="dialog" title="Supprimer participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'delete','siren'=>$this->siren,'idLien'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/supprimer.png" /></a>
|
||||
</td>
|
||||
<?php }?>
|
||||
|
||||
|
@ -36,7 +36,7 @@ div#etranger { display:none; }
|
||||
<?php } else {?>
|
||||
<div class="fieldgrp">
|
||||
Etes-vous certain de vouloir supprimer le lien entre <?=$this->rs?> (<?=$this->siren?>)
|
||||
de la société <?=$this->rs2?> (<?=$this->siren2?>) ?
|
||||
et <?=$this->rs2?> (<?=$this->siren2?>) ?
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
@ -54,7 +54,7 @@ div#etranger { display:none; }
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date du document ou date de cloture l'exercice :</label>
|
||||
<label>Date du document ou date de cloture de l'exercice :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="dateSaisie" value="<?=$this->dateSaisie?>" /> (JJ/MM/AAAAA)
|
||||
</div>
|
||||
@ -132,17 +132,51 @@ div#etranger { display:none; }
|
||||
<?php } else {?>
|
||||
<div class="fieldgrp">
|
||||
Etes-vous certain de vouloir supprimer le lien entre <?=$this->rs?> (<?=$this->siren?>)
|
||||
de la société <?=$this->rs2?> (<?=$this->siren2?>) ?
|
||||
et <?=$this->rs2?> (<?=$this->siren2?>) ?
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php }?>
|
||||
|
||||
<?php if ($this->mode=='add' || $this->mode=='edit') {?>
|
||||
<form name="lien" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'liensave'),null, true)?>" method="post">
|
||||
<input type="hidden" name="idLien" value="<?=$this->idLien?>" />
|
||||
<input type="hidden" name="id1" value="<?=$this->id1?>" />
|
||||
|
||||
<?php if ($this->mode=='edit' || $this->mode=='delete') {?>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Document de référence :</label>
|
||||
<div class="field">
|
||||
<select name="refDoc"><option value="">-</option></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Date du document ou date de cloture de l'exercice :</label>
|
||||
<div class="field">
|
||||
<input type="text" name="dateSaisie" value="<?=$this->dateSaisie?>" /> (JJ/MM/AAAAA)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Motif du changement :</label>
|
||||
<div class="field">
|
||||
<select name="">
|
||||
<option value="">-</option>
|
||||
<option>Fusion</option>
|
||||
<option>Cession de parts</option>
|
||||
<option>Acte SSP</option>
|
||||
<option>TUP</option>
|
||||
<option>Donation/Partage</option>
|
||||
<option>Vente/Cession</option>
|
||||
<option>Statuts</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php }?>
|
||||
|
||||
<?php if ($this->mode=='add' || $this->mode=='edit') {?>
|
||||
<fieldset>
|
||||
<legend>Liens</legend>
|
||||
|
||||
|
@ -113,7 +113,7 @@ $('input.autocomplete').autocomplete({
|
||||
},
|
||||
select: function(event, ui) {
|
||||
$('form[name=lien]').prepend('<input type="hidden" name="id2" value="'+ui.item.value+'"/>');
|
||||
$('div#searchFiche').replaceWith('<b>Fiche créée id = '+ui.item.value+'</b>');
|
||||
$('div#searchFiche').replaceWith('<b>Fiche sélectionnée id = '+ui.item.value+'</b>');
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user