$.getJSON('/ajax/groupe_liste_details.php', { prm_token: $("#token").val(), prm_eta_id: $('#eta_id').val(), prm_sec_id_role: '', prm_sec_id_besoin: '', prm_interne_seuls: true, output: 'json2'}, function(data){
$.each (data, function (idx, val) {
$('#participantselect-group').append('<option value="'+val.grp_id+'">'+val.grp_nom+'</option');
- });
- });
+ });
+ });
+
+ $('#participantselect-frame').append('<br/><label class="etiq" for="participantselect-statut">Statut :</label><select name="rech_sta_id" onchange="$(\'#participantselect-chercher\').click();" id="participantselect-statut"></select>');
+ $('#participantselect-statut').append('<option value="">(tous statuts)</option>');
+
+ $.getJSON('/ajax/statuts_usager_liste.php', { prm_token: $("#token").val() }, function (data) {
+ $.each(data, function (idx, val) {
+ $('#participantselect-statut').append('<option value="'+idx+'">'+val+'</option');
+ });
+ });
}
$('#participantselect-frame').append ('<div id="participantselect-buttons" style="text-align: center; margin-top: 5px"><button id="participantselect-chercher">Chercher</button></div>');
if (o.ajout) {
if(grp_id==null){
grp_id="";
}
- var args = { prm_token: $("#token").val(), prm_nom: $("#participantselect-nom").val(), prm_prenom: $("#participantselect-prenom").val(), prm_grp_id:grp_id, prm_type: type, prm_secteur: o.secteur, output: 'json' };
+ var sta_id = $("#participantselect-statut").val();
+ if(sta_id==null){
+ sta_id="";
+ }
+ var args = { prm_token: $("#token").val(), prm_nom: $("#participantselect-nom").val(), prm_prenom: $("#participantselect-prenom").val(), prm_grp_id:grp_id, prm_type: type, prm_secteur: o.secteur, prm_sta_id:sta_id, output: 'json' };
var url_recherche = "/ajax/personne_cherche.php";
if(o.secteur != null){