issue #0001372 : Delete action
This commit is contained in:
parent
1ad8fa272f
commit
793203ae88
@ -634,6 +634,16 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
|
||||
}
|
||||
|
||||
public function lienficheAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
$id = $request->getParam('idFiche');
|
||||
$ws = new WsScores();
|
||||
$result = $ws->getLienRef($id);
|
||||
$this->view->assign('result', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage des modifications Insee
|
||||
*/
|
||||
|
@ -1511,6 +1511,22 @@ class SaisieController extends Zend_Controller_Action
|
||||
*/
|
||||
if ($mode == 'delete') {
|
||||
|
||||
$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') {
|
||||
$this->view->assign('id2', $infos['idPar']);
|
||||
$this->view->assign('id1', $infos['idAct']);
|
||||
}
|
||||
|
||||
$this->view->assign('PDetention', $infos['PDetention']);
|
||||
$this->view->assign('Pvote', $infos['Pvote']);
|
||||
$this->view->assign('MajMin', $infos['MajMin']);
|
||||
|
||||
}
|
||||
//Mode = edit / add
|
||||
@ -1686,7 +1702,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
'nom' => $params['nom'],
|
||||
'prenom' => $params['prenom'],
|
||||
'nom_usage' => $params['nom_usage'],
|
||||
'naissance_date' => $params['naissance_date'],
|
||||
'naissance_date' => empty($params['naissance_date']) ? '' : WDate::dateT('d/m/Y','Ymd',$params['naissance_date']),
|
||||
'naissance_dept_pays' => $params['naissance_dept_pays'],
|
||||
'naissance_lieu' => $params['naissance_lieu'],
|
||||
'nat' => $params['nat'],
|
||||
@ -1730,7 +1746,6 @@ class SaisieController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sauvegarde
|
||||
|
@ -0,0 +1 @@
|
||||
<?php print_r($this->result); ?>
|
@ -55,7 +55,7 @@
|
||||
?>
|
||||
</td>
|
||||
<td class="StyleInfoLib" width="300">
|
||||
<?=$lien->nom?>
|
||||
<?=$lien->nom?> <a class="lienfiche" href="<?=$this->url(array('controller'=>'identite','action'=>'lienfiche', 'idFiche'=>$lien->idFiche))?>">Information</a>
|
||||
</td>
|
||||
<td class="StyleInfoData" width="150">
|
||||
<?php
|
||||
@ -128,6 +128,21 @@
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<script>
|
||||
$('a.lienfiche').each(function(){
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: "Chargement...",
|
||||
ajax: { url: $(this).attr('href') }
|
||||
},
|
||||
style: { classes: "ui-tooltip-dark" },
|
||||
position: {
|
||||
at: "top center",
|
||||
my: "bottom center"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php if ($this->edition) {?>
|
||||
<script>
|
||||
|
@ -44,6 +44,7 @@
|
||||
</div>
|
||||
<script>
|
||||
$('select[name=adresse_pays]').change(function(e){
|
||||
$('div#blocIdLocal').html('');
|
||||
AddSelectCountry($(this).val());
|
||||
});
|
||||
|
||||
@ -55,18 +56,20 @@ $('div#blocIdLocal').on('click', 'a.addIdLocal', function(e){
|
||||
|
||||
function AddSelectCountry(code, n){
|
||||
if (!n) { n=1; }
|
||||
var html = '';
|
||||
$.getJSON('/saisie/countryid', {code: code}, function(data){
|
||||
var option = '';
|
||||
$.each(data, function(i, item){
|
||||
option = option + '<option value="'+item.internalId+'">'+item.name+'</option>';
|
||||
if (n<=3){
|
||||
var html = '';
|
||||
$.getJSON('/saisie/countryid', {code: code}, function(data){
|
||||
var option = '';
|
||||
$.each(data, function(i, item){
|
||||
option = option + '<option value="'+item.internalId+'">'+item.name+'</option>';
|
||||
});
|
||||
if (option!=''){
|
||||
html = '<div class="fieldgrp"><label>Identifiant local</label>'+
|
||||
'<div class="field"><input type="text" name="idLoc'+n+'Num"/>'+
|
||||
'<select name="idLoc'+n+'Type">'+option+'</select><a href="'+n+'" class="addIdLocal">[+]</a></div></div>';
|
||||
}
|
||||
$('div#blocIdLocal').append(html);
|
||||
});
|
||||
if (option!=''){
|
||||
html = '<div class="fieldgrp"><label>Identifiant local</label>'+
|
||||
'<div class="field"><input type="text" name="idLoc'+n+'Num"/>'+
|
||||
'<select name="idLoc'+n+'Type">'+option+'</select><a href="'+n+'" class="addIdLocal">[+]</a></div></div>';
|
||||
}
|
||||
$('div#blocIdLocal').append(html);
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
@ -39,14 +39,14 @@
|
||||
<div class="fieldgrp">
|
||||
<label>au capital de</label>
|
||||
<div class="field">
|
||||
<input type="text" name="capital" /> euros, en date du <input type="text" name="dateCapital" value=""/>
|
||||
<input type="text" name="capital" /> euros, en date du <input type="text" name="dateCapital" value=""/> (JJ/MM/AAAA)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>découpé en</label>
|
||||
<div class="field">
|
||||
<input type="text" name="nbActions" value="" /> action(s), en date du <input type="text" name="dateNbActions" value=""/>
|
||||
<input type="text" name="nbActions" value="" /> action(s), en date du <input type="text" name="dateNbActions" value=""/> (JJ/MM/AAAA)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -179,6 +179,25 @@ class WsScores
|
||||
}
|
||||
}
|
||||
|
||||
public function getLienRef($id)
|
||||
{
|
||||
$params = new stdClass();
|
||||
$params->id = $id;
|
||||
$client = $this->loadClient('entreprise');
|
||||
try {
|
||||
$reponse = $client->getLienRef($params);
|
||||
return $reponse->getLienRefResult;
|
||||
} catch (SoapFault $fault) {
|
||||
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
|
||||
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
|
||||
return $fault->faultstring;
|
||||
} else {
|
||||
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function setLienRef($infos, $id = null)
|
||||
{
|
||||
$params = new stdClass();
|
||||
|
18
public/themes/default/scripts/liens.js
Normal file
18
public/themes/default/scripts/liens.js
Normal file
@ -0,0 +1,18 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
$('a.lienfiche').each(function(){
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: "Chargement...",
|
||||
title: { text: $(this).attr('name') },
|
||||
ajax: { url: $(this).attr('href') }
|
||||
},
|
||||
style: { classes: "ui-tooltip-dark" },
|
||||
position: {
|
||||
at: "top center",
|
||||
my: "bottom center"
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
Loading…
Reference in New Issue
Block a user