Subversion Repositories eFlore/Applications.cel

Rev

Rev 1240 | Rev 1249 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1240 Rev 1241
Line 368... Line 368...
368
				}
368
				}
369
			}
369
			}
370
		});
370
		});
371
	});
371
	});
372
}
372
}
-
 
373
//+---------------------------------------------------------------------------------------------------------+
-
 
374
// IDENTITÉ
-
 
375
$(document).ready(function() {
-
 
376
	$("#courriel").on('blur', function() {
-
 
377
		var courriel = $("#courriel").val();
-
 
378
		var urlAnnuaire = "http://www.tela-botanica.org/client/annuaire_nouveau/actuelle/jrest/utilisateur/identite-par-courriel/"+courriel;//http://localhost/applications/annuaire/jrest/
-
 
379
		$.ajax({
-
 
380
			url : urlAnnuaire,
-
 
381
			type : "GET",
-
 
382
			success : function(data, textStatus, jqXHR) {
-
 
383
				if (data != undefined) {
-
 
384
					var infos = data[courriel];
-
 
385
					$("#prenom").val(infos.prenom);
-
 
386
					$("#nom").val(infos.nom);
-
 
387
					$("#courriel_confirmation").val(courriel);
-
 
388
				}
-
 
389
			},
-
 
390
			error : function(jqXHR, textStatus, errorThrown) {
-
 
391
				console.log('ERREUR :'+textStatus);
-
 
392
			},
-
 
393
			complete : function(jqXHR, textStatus) {
-
 
394
				console.log('COMPLETE :'+textStatus);
-
 
395
				$("#zone-prenom-nom").removeClass("hidden");
-
 
396
			}
-
 
397
		});
-
 
398
	});
-
 
399
});
Line 373... Line 400...
373
 
400
 
374
//+---------------------------------------------------------------------------------------------------------+
401
//+---------------------------------------------------------------------------------------------------------+
375
// FORMULAIRE
402
// FORMULAIRE