Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2372 Rev 2374
Line 120... Line 120...
120
			url: urlAnnuaire,
120
			url: urlAnnuaire,
121
			type: 'GET',
121
			type: 'GET',
122
			success: function(data, textStatus, jqXHR) {
122
			success: function(data, textStatus, jqXHR) {
123
				if (data != undefined && data[courriel] != undefined) {
123
				if (data != undefined && data[courriel] != undefined) {
124
					var infos = data[courriel];
124
					var infos = data[courriel];
125
					$('#id_utilisateur').val(infos.id);
-
 
126
					$('#prenom').val(infos.prenom);
-
 
127
					$('#nom').val(infos.nom);
-
 
128
					$('#courriel_confirmation').val(courriel);
125
					surSuccesCompletionCourriel(infos, courriel);
129
					$('#prenom, #nom, #courriel_confirmation').attr('disabled', 'disabled');
-
 
130
					$('#structure').focus();
-
 
131
				} else {
126
				} else {
132
					surErreurCompletionCourriel();
127
					surErreurCompletionCourriel();
133
				}
128
				}
134
			},
129
			},
135
			error: function(jqXHR, textStatus, errorThrown) {
130
			error: function(jqXHR, textStatus, errorThrown) {
Line 146... Line 141...
146
function surErreurCompletionCourriel() {
141
function surErreurCompletionCourriel() {
147
	$('#prenom, #nom, #courriel_confirmation').removeAttr('disabled');
142
	$('#prenom, #nom, #courriel_confirmation').removeAttr('disabled');
148
	afficherPanneau('#dialogue-courriel-introuvable');
143
	afficherPanneau('#dialogue-courriel-introuvable');
149
}
144
}
Line -... Line 145...
-
 
145
 
-
 
146
function surSuccesCompletionCourriel(infos, courriel) {
-
 
147
	$('#id_utilisateur').val(infos.id);
-
 
148
	$('#prenom').val(infos.prenom);
-
 
149
	$('#nom').val(infos.nom);
-
 
150
	$('#courriel_confirmation').val(courriel);
-
 
151
	$('#prenom, #nom, #courriel_confirmation').attr('disabled', 'disabled');
-
 
152
	$('#structure').focus();
-
 
153
 
-
 
154
	$('#dialogue-courriel-introuvable').hide();
-
 
155
}
150
 
156
 
151
function formaterNom() {
157
function formaterNom() {
152
	$(this).val($(this).val().toUpperCase());
158
	$(this).val($(this).val().toUpperCase());
Line 153... Line 159...
153
}
159
}
Line 959... Line 965...
959
 
965
 
960
	return false;
966
	return false;
Line 961... Line 967...
961
}
967
}
-
 
968
 
-
 
969
function ajouterObs() {
-
 
970
	// Fermeture automatique des dialogue de transmission de données
-
 
971
	$('#dialogue-obs-transaction-ko').hide();
962
 
972
	$('#dialogue-obs-transaction-ok').hide();
963
function ajouterObs() {
973
 
964
	if (validerFormulaire() == true) {
974
	if (validerFormulaire() == true) {
965
		obsNbre = obsNbre + 1;
975
		obsNbre = obsNbre + 1;
966
		$('.obs-nbre').text(obsNbre);
976
		$('.obs-nbre').text(obsNbre);