67 lines
1.7 KiB
PHTML
Raw Normal View History

2012-12-13 13:26:36 +00:00
<input type="hidden" name="idLien" value="<?=$this->idLien?>"/>
<?php if ($this->mode=='fusion') {?>
Fusionner la fiche
<div id="searchFiche">
<div class="fieldgrp">
<label>Recherche</label>
<div class="field">
<select name="searchType">
<option value="nom">Nom</option>
<option value="siren">Siren</option>
<option value="id">Identifiant</option>
<option value="special">Spéciaux</option>
</select>
<select name="searchCountry" style="width:100px;">
<option value="">-</option>
<?php foreach($this->countries as $code => $item) {?>
<option value="<?=$code?>"<?=$select?>><?=$item['libPays']?></option>
<?php }?>
</select>
<input type="text" name="searchTxt" class="autocomplete"/>
</div>
</div>
</div>
<script>
$('input.autocomplete').autocomplete({
minLength:4,
delay:1000,
source: function(request, response) {
var query = request.term;
var type = $('select[name=searchType]').val();
switch( type ) {
case 'siren': break;
case 'id': break;
case 'nom':
if ($('select[name=searchCountry]').val()!='') {
query = query + ',' + $('select[name=searchCountry]').val();
}
break;
}
$.getJSON('<?=$this->url(array('controller'=>'saisie','action'=>'liensearch'),null,true)?>', { q: query, type: type },
function(data) { response(data); }
);
},
select: function(event, ui) {
$('form[name=lien]').prepend('<input type="hidden" name="id2" value="'+ui.item.value+'"/>');
$('div#searchFiche').replaceWith('<b>Fiche sélectionnée '+ui.item.label+' (id = '+ui.item.value+')</b>');
}
});
</script>
<?php } elseif ($this->mode=='moveact'){?>
Déplacer l'actionnaire
<?php }elseif ($this->mode=='movepar') {?>
Déplacer la participation
<?php }?>