2009-03-26 19:22:07 +00:00
|
|
|
<?php
|
|
|
|
$tribunal = (isset($_REQUEST['tribunal'])? $_REQUEST['tribunal'] : '');
|
|
|
|
?>
|
|
|
|
<label>Mandataire <font color="Red">*</font></label>
|
|
|
|
<input type="text" name="mand" value="">
|
|
|
|
<input type="hidden" name="jugement[mand]" value="">
|
2010-02-23 15:27:18 +00:00
|
|
|
<span class="left">
|
|
|
|
<a id="lienMandataireEdit" class="lienMandataire" title="Editer le mandataire"
|
|
|
|
href="./pages_saisie/mandataire.php">
|
|
|
|
<img src="../img/edit1.gif" alt="Edition mandataire"/>
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
<p>
|
|
|
|
<a id="lienMandataireAdd" class="lienMandataire" title="Ajouter un mandataire"
|
|
|
|
href="./pages_saisie/mandataire.php?tribunal=<?=$tribunal?>" >
|
|
|
|
Ajouter un mandataire
|
|
|
|
</a></p>
|
2009-03-26 19:22:07 +00:00
|
|
|
|
2009-03-27 08:34:36 +00:00
|
|
|
<script type="text/javascript">
|
2010-02-23 15:27:18 +00:00
|
|
|
$(document).ready(function()
|
|
|
|
{
|
2009-03-27 08:34:36 +00:00
|
|
|
$("[name=mand]").autocomplete( "./pages_saisie/searchMandataires.php",
|
2009-04-09 11:05:36 +00:00
|
|
|
{
|
|
|
|
delay: 800,
|
|
|
|
minChars: 3,
|
|
|
|
cacheLength: 1,
|
|
|
|
formatItem: formatItem,
|
2009-04-28 10:28:20 +00:00
|
|
|
width: 400,
|
2009-04-28 15:54:10 +00:00
|
|
|
max: 40
|
2009-04-09 11:05:36 +00:00
|
|
|
}
|
|
|
|
);
|
2009-08-18 10:15:55 +00:00
|
|
|
|
2009-03-27 08:34:36 +00:00
|
|
|
$("[name=mand]").result(function(event, data, formatted) {
|
|
|
|
var tribunal = $("#tribunal option:selected").val();
|
|
|
|
var idMandataire = data[1];
|
|
|
|
$("[name=jugement[mand]]").val(idMandataire);
|
2010-02-23 15:27:18 +00:00
|
|
|
$('#lienMandataireEdit').attr('href','./pages_saisie/mandataire.php?tribunal='+tribunal+'&id='+idMandataire);
|
2009-08-18 10:15:55 +00:00
|
|
|
});
|
|
|
|
|
2009-03-27 08:34:36 +00:00
|
|
|
function formatItem(row) { return row[0] + " (id: " + row[1] + ")"; }
|
2009-03-26 19:22:07 +00:00
|
|
|
});
|
|
|
|
</script>
|